3 ms·
Sure you can: http://hackage.haskell.org/packages/archive/ghc-prim/0.2.0.0/doc/html/src/GHC-Types.html#IO http://hackage.haskell.org/packages/archive/ghc-prim/0
by kenko 13y ago
Sure you can: http://hackage.haskell.org/packages/archive/ghc-prim/0.2.0.0/doc/html/src/GHC-Types.html#IO http://hackage.haskell.org/packages/archive/ghc-prim/0.2.0.0...
You can't define RealWorld, though, nor (IIRC) is IO really a state monad.
- Zak 13y agoI used "define" imprecisely. You cannot, so far as I know, implement `>>=` for the IO type defined in the above link within Haskell, which means you can't actually use it to do IO.
- kenko 13y agohttp://www.haskell.org/ghc/docs/latest/html/libraries/base/src/GHC-Base.html#returnIO http://www.haskell.org/ghc/docs/latest/html/libraries/base/s...