Re: Docs don't agree with behaviour for redefining member/2, memberchk/2.

From: Joachim Schimpf <j.schimpf_at_icparc.ic.ac.uk>
Date: Wed 24 Jan 2001 03:03:06 PM GMT
Message-ID: <3A6EEEAA.B8ECA285@icparc.ic.ac.uk>
The doc is obsolete. I try to summarise :-)

There used to be 3 levels (before 5.0)

protected:	error, redefinition not done
system:		warning, redefinition done
none:		silent, redefinition done

We got rid of the notion of protectedness, and now we have

system:		error, redefinition not done
none:		warning, redefinition done	

'system' predicates are created when there is a
:-pragma(system).
in the source file. This is mainly used for the kernel
to prevent you from accidentally hiding an important
builtin (especially ,/2).

Both error and warning can be overridden by declaring the
predicate with local/1 before redefining it.

I think member etc have accidentally become 'system'
predicates since they are actually defined in sepia_kernel
and reexported through lib(lists). Other lists-predicates
are ok:

[eclipse 1]: [user].
 flatten(_,_).
 WARNING: Hiding imported predicate flatten/2 from module lists in module eclipse (use local/1)
user       compiled traceable 16 bytes in 0.00 seconds

yes.


This should be fixed, and the doc corrected.

-- Joachim
Received on Wed Jan 24 15:03:06 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:03 PM GMT GMT