|
|
|
|
|
by eli_gottlieb
4772 days ago
|
|
Quite correct. As I'm aware, when you call "main" in Haskell, you're actually building up a really gigantic curried function of type `IO x` (where x is your return type), and then the runtime system runs everything in the curried function all at once. The `RealWorld` symbol is more-or-less an existential type: we can't do anything with it, but it exists to make the type system acknowledge the monadic nature of IO so that we can use monadic combinators to order our curried I/O actions in preparation for their eventual run on real hardware. |
|