[Haskell-cafe] Re: philosophy of Haskell

Heinrich Apfelmus apfelmus at quantentunnel.de
Wed Aug 18 04:01:18 EDT 2010


Bill Atkins wrote:
> Conal Elliott wrote:
> 
>> And the IO monad is what Jerzy asked about.  I'm pointing out that
>> the state monad does not capture concurrency, and the "EDSL model"
>> does not capture FFI.  (Really, it depends which "EDSL model".  I
>> haven't seen one that can capture FFI.  And maybe not concurrency
>> either.)
> 
> So which model captures the way the IO monad works?

This is thoroughly discussed in section 3 of

     Simon Peyton Jones.
     Tackling the awkward squad: monadic input/output, concurrency,
       exceptions, and foreign-language calls in Haskell
     http://tinyurl.com/spj-marktoberdorf

In particular, the  World -> (a,World)  model is unsuitable even without 
concurrency because it cannot distinguish

    loop, loop' :: IO ()
    loop  = loop
    loop' = putStr "c" >> loop'

I interpret the "EDSL model" to be the operational semantics presented 
in the tutorial paper.


Regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com



More information about the Haskell-Cafe mailing list