diff: typeclass user documentation
David Glen JEFFERY
dgj at cs.mu.OZ.AU
Fri Jan 23 16:44:34 AEDT 1998
> Hi DJ,
>
> I've got a couple of minor suggestions about your documentation:
>
> > +:- pred distance(P1, P2, float) <= point(P1), point(P2).
> > +:- pred distance(in, in, out) is det.
>
> s/pred/mode/ in the 2nd line.
Yes, I fixed that in the revised diff that I posted. (I found a couple of
such typos in the test cases when I compiled them).
> Also, what is the syntax when combining the type and mode declarations
> into one declaration (if this is allowed)?
Yes, it is allowed.
e.g.
:- pred distance(P1::in, P2::in, float::out) <= (point(P1), point(P2)) is det.
I will add an example like this to the user docs RSN.
love and cuddles,
dgj
--
David Jeffery (dgj at cs.mu.oz.au) | Marge: Did you just call everyone "chicken"?
MEngSc student, | Homer: Noooo. I swear on this Bible!
Department of Computer Science | Marge: That's not a Bible; that's a book of
University of Melbourne | carpet samples!
Australia | Homer: Ooooh... Fuzzy.
More information about the developers
mailing list