3 ms·
In Haskell, getChar isn't a function (something of type a -> b), its type is IO Char http://hackage.haskell.org/package/base-4.11.1.0/docs/Prelude.html#v:getCh
by somenewacc 8y ago
In Haskell, getChar isn't a function (something of type a -> b), its type is IO Char
http://hackage.haskell.org/package/base-4.11.1.0/docs/Prelude.html#v:getChar http://hackage.haskell.org/package/base-4.11.1.0/docs/Prelud...
It represents an interaction with the outside world that results in a Char when you perform it. It isn't a function because in Haskell functions must be pure (with no side effects).