为什么这个类型检查:
runST $ return $ True
Run Code Online (Sandbox Code Playgroud)
虽然以下不是:
runST . return $ True
Run Code Online (Sandbox Code Playgroud)
GHCI抱怨:
Couldn't match expected type `forall s. ST s c0'
with actual type `m0 a0'
Expected type: a0 -> forall s. ST s c0
Actual type: a0 -> m0 a0
In the second argument of `(.)', namely `return'
In the expression: runST . return
Run Code Online (Sandbox Code Playgroud)