Can anybody explain GHC's definition of IO?
问题 The title is pretty self-descriptive, but there's one part that caught my attention: newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #)) Stripping the newtype , we get: State# RealWorld -> (# State# RealWorld, a #) I don't know what State# stands for. Can we replace it with State like this: State RealWorld -> (State RealWorld, a) And can that be expressed as this, then? State (State RealWorld) a This particular construct caught my attention. I know that conceptually, type IO a =