[Haskell] Re: Mixing monadic and non-monadic functions

Wolfgang Jeltsch wolfgang at jeltsch.net
Sat Sep 10 18:03:58 EDT 2005


Am Freitag, 9. September 2005 23:56 schrieb Frederik Eaton:
> [...]

> Would it mean treating the 'Monad' class specially? Perhaps, but I
> don't think this is a reason to avoid it.

As far as I can see, your approach would make Haskell a kind of imperative 
programming language.  Side-effects would be hidden in expressions which is a 
thing I want to see strictly avoided.

> [...]

> Also, I do not think that template haskell is powerful enough to
> support this, but I'm willing to be proven wrong.

I suppose that Template Haskell is powerful enough to automatically declare 
instances of classes like Num for monadic types, based on instances for 
non-monadic types.

> Frederik

Best wishes,
Wolfgang


More information about the Haskell mailing list