runST и композиция функций

Почему проверяется этот тип:

runST $ return $ True

В то время как следующее - нет:

runST . return $ True

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
53
задан Grzegorz Chrupała 27 February 2012 в 05:59
поделиться