[Haskell-cafe] RE: DDC compiler and effects;better than Haskell?

Bayley, Alistair Alistair.Bayley at invesco.com
Wed Aug 12 05:26:02 EDT 2009

> From: haskell-cafe-bounces at haskell.org 
> [mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Pavel Perikov
> > unless you have some insanely
> > clever refactoring tool ready that can convert pure into monadic
> > functions and vice versa.
> Not trying to attack the idea, just some thoughts:
> I don't see much problem converting pure function into an 
> "effectfull"  
> form :) Having pure function
> myPureFunction::a1->a2->a3->res
> ....
> myPureFunction a1 a2 a3 -- pure call
> myPureFunction <$> a1 <*> a2 <*> a3 -- call using Applicative
> Probably, introducing some conventions and using some language  
> extensions you can write a function taking pure function and  
> converting it into monadic version (a-la SPJ' work on polyvariadic  
> composition etc [1])
> Have monadic function but needs to call it from pure code? use  
> Control.Monad.Identity.
> Not a big deal to me but maybe I'm missing the point

In the HaRe catalogue (
http://www.cs.kent.ac.uk/projects/refactor-fp/catalogue/ ) there exists
a "Monadification" refactoring:

Confidentiality Note: The information contained in this message,
and any attachments, may contain confidential and/or privileged
material. It is intended solely for the person(s) or entity to
which it is addressed. Any review, retransmission, dissemination,
or taking of any action in reliance upon this information by
persons or entities other than the intended recipient(s) is
prohibited. If you received this in error, please contact the
sender and delete the material from any computer.

More information about the Haskell-Cafe mailing list