[Haskell] overuse of maybe and  in prelude and libs
robertw at stud.tu-ilmenau.de
Fri Apr 9 11:09:59 EDT 2004
On Thu, 8 Apr 2004, S. Alexander Jacobson wrote:
> > Haskell is pretty good about letting you install a different Prelude,
> > so you could try it yourself.
> Hmm. That's interesting! How does this work?
For your purpose it may suffice to hide some identifiers from the Prelude
and provide your own implementations. The abstract Collections do it like
this at the moment, you use them thus:
import Prelude ()
So a user doesn't need to care which indentifiers exactly are replaced and
which not: only the wrapper module needs to care. Example:
In fact, this style for Collections already allows programmers to work
with a much more expressive kind of Haskell, e.g. one 'fold' or 'filter'
or... for all kinds of Collections (including traditional lists). (The
grand unified Collections Framework is already there, you just need to use
More information about the Haskell