[mercury-users] Modules, Submodules and Instances.
David Glen JEFFERY
dgj at cs.mu.OZ.AU
Sat Jan 30 04:20:57 AEDT 1999
On 29-Jan-1999, Ralph Becket <rwab1 at cam.sri.com> wrote:
> (1) MODULE QUALIFIERS
> I've noticed a drift from `name__' as a module qualifier to `name:' -
> personally I find the former easier on the eyes, but oh well. ':' is
> yukky, '.' is nice. How long will '__' stick around? Will '.' ever
> make it in?
AFAIK, '__' will stay around for ever, but ':' is deprecated. I'm fairly
sure that the intention is for '.' to be implemented one of these days...
fjh may be able to add more.
> (2) TYPECLASS INSTANCES
> Say I want to export a type t as an instance of some typeclass c.
> Currently I have to do something like
> But here I'm releasing information about the implementation of t to
> the outside world. Now, this is in the same class of minor crime as
> the mode problem, but I wonder whether it would really be that much
> harder to get the compiler to handle putting
> :- instance c(t).
> in the interface and requiring
> :- instance c(t) where [...].
> in the implementation.
You are quite correct. I certainly plan on adding this before the next release.
> (3) SUBMODULES - THE BIGGY
> The language reference is somewhat cryptic on the matter of submodules
I'll leave that one for Fergus (the human language reference manual ;-) )
> p.s. Interestingly, this morning I was sober and everything was going
> wrong, but now I'm a up to the end of a post-meeting bottle-o-plonk
> and things are working much better. There's a lesson in here
I think there's something in that for all of us.
David Jeffery (dgj at cs.mu.oz.au) | Marge: Homer, is this how you pictured
PhD student, | married life?
Dept. of Comp. Sci. & Soft. Eng.| Homer: Yup, pretty much... except we
The University of Melbourne | drove around in a van solving
Australia | mysteries.
More information about the users