[m-dev.] Mode syntax suggestion (possibly gross)

Ralph Becket rbeck at microsoft.com
Wed Sep 27 01:43:04 AEDT 2000


I suspect this is a horrible idea, but...

Suggestion: if I have a type foo/N and an inst foo/0 then interpret
modes in/0 and out/0 as in(foo) and out(foo) respectively in mode
declarations.

Justification: if I decide to change a type so that it carries around
some non-simple data (e.g. going from a bool to a maybe(func(T1) = T2))
then (a) I have to create a special inst for objects of this type and
(b) I then have to hunt down every location where the type is used and
change the modes of those arguments.  Very tedious.

I know this is somewhat unpleasant, but the current mode syntax *is*
cumbersome as soon as you try anything interesting.  I'd be happy to
hear any other, less hacky, suggestions.

Ralph

--
Ralph Becket      |      MSR Cambridge      |      rbeck at microsoft.com 
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list