[mercury-users] Implementing Edison in Mercury

Ralph Becket rbeck at microsoft.com
Tue Sep 19 20:32:04 AEDT 2000


> > 
> > Edison seems to have a pretty sensible typeclass hierarchy for
> > sequences, collections and maps.  It occurs to me that this
> > would make a good start for v2 of the library.  Any thoughts?
> > 

I've been looking at the Edison code & docs.  There are several
places where I would do things differently, for example

- add Mercury-standard synonyms such as `empty' for `null',
`search' for `lookupM' etc.,
- use semidet preds rather than funcs returning bool,
- eschew the maybe[23] types and replace such functions with
semidet predicates returning [23] arguments,
- use naming_with_underscores rather than horribleJavaesqueNames,
- have a consistent argument order for higher order predicates
(in Edison, the fold function has a different signature for
foldl and foldr),
- rename *FiniteMap* type classes as *map*,
- change the behaviour of some functions (e.g. tail of the empty
sequence should raise an error, not return the empty sequence,
IMHO),
- and so forth.

On the other hand, there may be some virtue in sticking as closely
as possible to Edison as it stands.  Any strong feelings on the
matter?

Ralph

--
Ralph Becket      |      MSR Cambridge      |      rbeck at microsoft.com 
--------------------------------------------------------------------------
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