Jon Fairbairn wrote:
> Am I alone in thinking that the prelude is desperately in
> need of restructuring? 
No.  Personally I think it should be got rid of entirely, or rather
trimmed down to the absolute bare minimum required for the syntax.

By the way I think Sven's proposals are thoroughly excellent.  I don't
agree with those who say that empty sets, empty maps and so on should all
have the same name, distinguished only by module.  This is just too
inconvenient.  Lennart Augustsson writes:
   If I want to switch from FooTree to BarTree
   I have to change all over the code
Well I think the solution to this is to make the name for the
empty object "emptyXXX" (and the type name itself)
only encode the functionality provided.  Thus all balanced trees (or anything
which provides a reasonable mapping function on an Ordered type) should have
the same type name and "emptyXXX" name.  If you want to change from one sort
of balanced tree to another you only have to change the import declaration.
If you want a more fundamental change, say between hash tables and balanced
trees, then you WILL have to go through changing emptyXXX to emptyYYY
(if you don't want the quick hack of saying "import YYY;emptyXXX=emptyYYY")
but since the functionality has changed I think you should have to anyway.

Reply via email to