[Haskell-cafe] On the purity of Haskell

Gregg Reynolds dev at mobileink.com
Thu Dec 29 21:23:45 CET 2011


On Dec 29, 2011, at 1:21 PM, Heinrich Apfelmus wrote:

> Why would  IO Int  be something special or mysterious?

I don't know if it is special or mysterious, but I'm pretty sure IO is non-deterministic, non-computable, etc.  In other words not the same as computation.

> It's an ordinary value like everything else; it's on the same footing as [Char], Maybe Int, Int -> String, Bool, and so on. I see no difference between the list  [1,2,3] :: [Int]  and the action  "pick a random number between 1 and 6" :: IO Int  .

We'll have to agree to disagree - I see a fundamental difference.  But that's ok, nothing says everybody has to agree on the One True Way to think about computing.

Cheers,

Gregg


More information about the Haskell-Cafe mailing list