[Haskell] Types of when and unless in Control.Monad
Dan Burton
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...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20120421/5f539b05/attachment.htm>
More information about the Libraries
mailing list