【发布时间】:2013-06-26 16:23:47
【问题描述】:
如果我有一个函数f :: State Int (),是否可以在另一个函数g :: StateT Int IO () 中使用它?用f = do { something; g } 嵌套它无法用Couldn't match type 'Data.Functor.Identity.Identity' with 'IO' 进行类型检查。
【问题讨论】:
-
不应该有
g = do { something; f }吗?你想在 g 中使用 f,对吧?
标签: haskell