as pattern and mostly_xxx

Martin Stein ms40 at inf.tu-dresden.de
Wed Oct 14 07:12:31 AEST 1998


Hi,

1. I wonder but I can't find anything like the as-pattern in Haskell. It would
be very convenient to write something like
    pred(T is node(Tr,K,V,Tl),...)

Or missed I something?
Writing 'T is ...' as a goal creates a new node. Is that right? (So that would
be less efficient than the as-pattern.)

2. I ran into problems using then random module. The compiler itself couldn't
deduce the modes for predicates using a type like xx(random__supply) and the
compiler didn't accept my modes, too. Due to the manual that arose because of
not yet implemented features. Or am I wrong? (It's only a question. I'm using my
own random.m with in and out instead, that works.)

Martin Stein

BTW Is there any support for a Mercury emacs-mode?



More information about the users mailing list