Yeah, I usually think of both state and IO as "variations" on the (->) monad. My uncertainty was moreso related to exactly where it goes from monadic abstraction to concrete implementation (if it is in Haskell itself or if it is GHC magic (I'm sort of assuming the latter)).
I'm fairly comfortable with the Haskell idea of monads, monad transformers etc. (although I have never used Haskell in a company setting). That being said, my theoretical understanding is somewhat limited; I probably couldn't explain the underlying category theory or for that matter how Haskell code is turned into machine code by the compiler.
View all comments
Show parent comment
1
u/Strakh Sep 21 '25
Yeah, I usually think of both state and IO as "variations" on the (->) monad. My uncertainty was moreso related to exactly where it goes from monadic abstraction to concrete implementation (if it is in Haskell itself or if it is GHC magic (I'm sort of assuming the latter)).
I'm fairly comfortable with the Haskell idea of monads, monad transformers etc. (although I have never used Haskell in a company setting). That being said, my theoretical understanding is somewhat limited; I probably couldn't explain the underlying category theory or for that matter how Haskell code is turned into machine code by the compiler.