4 ms·
You do get the same output. main returns a monadic data-structure which tells the Haskell runtime what to output in response to certain inputs. See: http://con
by tylerhou 7y ago
You do get the same output. main returns a monadic data-structure which tells the Haskell runtime what to output in response to certain inputs.
See: http://conal.net/blog/posts/the-c-language-is-purely-functional http://conal.net/blog/posts/the-c-language-is-purely-functio...
- tehsauce 7y agoNitpick but technically there is not a Haskell runtime, only compiler (at least if we're talking about ghc)
- eyevanmalicesun 7y agoThere is most definitely a haskell runtime... what do you think handles garbage collection in haskell programs. Haskell also needs a runtime to execute its evaluation strategy which is not call stack based, but graph reduction based.
- nilkn 7y agoGHC does have a runtime system, conveniently called RTS. This page has some more details: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/runtime_control.html https://downloads.haskell.org/~ghc/latest/docs/html/users_gu...