[Haskell] Types of when and unless in Control.Monad
danburton.email at gmail.com
Sat Apr 21 17:46:42 CEST 2012
> > P.S.: A more systematic solution would be to change the Haskell
> > language by either introducing a Top type which is the supertype of
> > everything and use it instead of ().
Haskell doesn't have subtyping, so this wouldn't really make sense. Perhaps
a typeclass Top would make sense (where the compiler automatically creates
an instance of it for all types), but then `Top a => a` would be equivalent
to just `a`, so it wouldn't really serve any purpose.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libraries