[mercury-users] importing submodules
Ralph Becket
rafe at cs.mu.OZ.AU
Sun Dec 1 21:33:36 AEDT 2002
Michael Day, Friday, 29 November 2002:
>
> Personally I'd like you to explain to me what parameterised modules are :)
ML has a parameterised module system. Essentially, a module takes
arguments (that range over modules) that are instantiated by the
importer of the module. Each Module argument must conform to a
specific signature schema. The whole thing is somewhat similar to using
type classes, except that there is no need to explicitly annotate every
symbol with the appropriate type class constraints.
As an example, we might have a generic back-end module for the compiler
that took a module argument which would be instantiated with a different
module for each specific back-end (e.g. back_end(i86) vs back_end(c) vs
back_end(java) and so forth.)
- Ralph
--------------------------------------------------------------------------
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