[Haskell-cafe] Function Precedence

Loup Vaillant loup.vaillant at gmail.com
Wed Apr 2 10:20:10 EDT 2008


2008/4/2, Hans Aberg <haberg at math.su.se>:
> On 2 Apr 2008, at 14:27, jerzy.karczmarczuk at info.unicaen.fr
> wrote:
>
> > > It would be better to write a new Prelude. :-)
> >
> > Oh, yes, our common dream...
>
>  One may not need to write a wholly new Prelude, by something like:
>
>  module NewPrelude where
>
>  import Prelude hiding -- Num, (+).
>
>  class AdditiveSemiMonoid a where
>   (+) :: a -> a -> a

Err, why *semi* monoid? Plain "monoid" would not be accurate?

<rant>
While we're at it, what about adding even more classes, like "group"
or "ring"? Algebra in a whole class hierachy. :-)
</rant>

Loup


More information about the Haskell-Cafe mailing list