Where prelude alternatives/ classes and types to get values?

Stefan O'Rear stefanor at cox.net
Sat Feb 17 11:19:36 EST 2007

On Sat, Feb 17, 2007 at 05:48:15PM +0100, Marc Weber wrote:
> The prelude has some issues such like 
> Map.empty,
> Sequnce.empty,
> Set.empty
> It would be much nicer to use
> class Empty where
> empty :: a
> except of more complicated error messages (especially for newbies)
> Are there already some proposals?
> Is this the right place to discuss these topics?

Yes, and Yes.

In my opinion, Haskell should take a cue from the videogame industry
and create an EasyPrelude, normal Prelude, and HardPrelude.

The EasyPrelude would be something like the Helium prelude - very
little overloading.

The normal prelude would be the Haskell 98 prelude, modulo bugfixes.

The hard prelude would be everything we want, newbies can be ignored.
Classes for functors, emptyable functors, catenable functors, applicative
functors, monoids, semigroups, (+) and (++) overloaded, etc, etc, etc.

> I got this idea because I'm currently learning more about webfunctions.
> Some states (eg counters) are implemented using IORefs.
> I could imagine a class
> ...

Look at Bulat's ArrayRef library. http://haskell.org/haskellwiki/Library/ArrayRef

More information about the Libraries mailing list