[mercury-users] undefined symbol `::/2'.

Matthews, John John.Matthews at compaq.com
Thu Jul 19 04:11:42 AEST 2001


Hi,

I'm a Mercury neophyte, and I've run into the following error (among others)
when I try to compile the module below:

between.m:015: In clause for predicate `between:between/3':
between.m:015:   in argument 1 of clause head:
between.m:015:   error: undefined symbol `::/2'.
between.m:015: In clause for predicate `between:between/3':
between.m:015:   in argument 1 of clause head:
between.m:015:   in argument 2 of functor `::/2':
between.m:015:   error: undefined symbol `in/0'.
...


-------------------------------------------

:- module between.

:- interface.

:- import_module int.

:- pred between(int,int,int).
:- mode between(in,in,in) is semidet.
:- mode between(in,out,in) is multi.

:- implementation.

:- pragma promise_pure(between/3).

between(Min::in, X::in, Max::in) :-
  Min <= X, X <= Max.

between(Min::in, X::out, Max::in) :-
  Min <= Max,
  (X = Min; between(Min + 1, X, Max)).

-------------------------------------------

This module uses the mode-based overloading feature of Mercury, as
documented in
 
http://www.cs.mu.oz.au/research/mercury/information/doc/reference_manual_4.h
tml#SEC39

I am compiling with mercury-0.10, for platform alphaev5-dec-osf3.2 (Although
I am actually on an AlphaStation XP900 running Digital Unix V5.0).

To compile this file (called between.m), I used the shell commands:

  mmake between.depend
  mmake libbetween


I have only just now subscribed to the mercury-users mailing list and
haven't received confirmation yet, so I would appreciate any replies sent to
the list also be cc'd to me directly.

Thanks in advance!

-john
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list