Closed freizl closed 2 years ago
class (Monad m) => MonadState s m | m -> s where ... 额。。。这个 | m -> s 是啥语法啊
关键字 Functional dependencies
Functional dependencies
http://www.haskell.org/haskellwiki/Functional_dependencies
函数式依赖。functional dependencies。因为有些函数只用到m,这时候s就是不确定的。加上依赖之后,就可以确定了。具体参考wuhaisheng的链接
class (Monad m) => MonadState s m | m -> s where ... 额。。。这个 | m -> s 是啥语法啊