DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

Pavel Perikov perikov at gmail.com
Wed Aug 12 05:13:31 EDT 2009

> 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 -- 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  

Not a big deal to me but maybe I'm missing the point

[1] http://okmij.org/ftp/Haskell/types.html#polyvar-comp

More information about the Haskell-Cafe mailing list