type C = StateT Int (ErrorT String IO)
main :: C()
main = do
args <- liftIO $ getArgs
case args of
[] -> liftIO $ putStrLn "E"
(p:ps) -> s "d"
s :: String -> C()
私はエラーを持っている:マッチングタイプとモナド。エラー
Couldn't match type ‘Control.Monad.Trans.State.Lazy.StateT
Int
(Control.Monad.Trans.Error.ErrorT String IO)
()’
with ‘IO t0’
Expected type: IO t0
Actual type: C()
In the expression: main
When checking the type of the IO action ‘main’
エラーとどのようにそれを修復することがありますなぜ私は理解できません。助けてください。
[Haskellの主な特長は何ですか?](0120-17753-1) – duplode