[Haskell-beginners] Why WinGHCi does not complain with no import?

fa-ml fa-ml at ariis.it
Tue Jan 7 14:05:44 UTC 2014


On Tue, Jan 07, 2014 at 01:58:37PM +0000, Angus Comber wrote:
> I can run getLine' in WinGHCi with no problem.  But how does WinGHCi know
> about getChar and IO?

getChar is defined in the Prelude [1] (and the Prelude gets imported by default
in every program/module)

[1] http://www.haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:getChar


More information about the Beginners mailing list