Hacker News new | ask | show | jobs
by somenewacc 2924 days 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/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).