[mercury-users] Library v2 and Typeclasses'n'Stuff

Ralph Becket rbeck at microsoft.com
Sat Oct 30 00:21:07 AEST 1999


Hi,

now that mmc v. 0.9 is around the corner and the language has developed so
much, it's probably time to start some serious discussion about the content
and structure of v2 of the standard library.

Stdlib v2 should have the following features, IMHO (Fergus et al. have
already mentioned most/all of these):

- use submodules under a common name space;
- be carefully constructed so as to make it easy to exploit in higher order
code;
- use DCG friendly argument ordering conventions in `stateful' ADTs (e.g.
arrays);
- make extensive use of typeclasses;
- make extensive use of assertions/promises.

To get the ball rolling, I propose a brainstorming sesh.

Typeclasses:

- showable(T) where
	func to_string(T) = string

- ordered(T) where
	pred T < T is semidet,
	pred T =< T is semidet

- set(T) where
	... the usual suspects ...

- tree(T) where
	...

Functionality:

- IO
- Maths
- Higher order stuff (map, fold, compose, currying, ...)
- Maps (map, assoc_list, hash table, ...)
- Collections (list, array, set, ...)
- Parsing (std. syntax, regex, awk-like stuff, ...)
- Graphs (general, partial order, irreflexive, ...)

Hmm, prob. get a lot of good stuff looking at e.g. the Haskell libraries.
There must be a whole closure of Haskell experts reading this list...

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