问题
I am trying to import Writer monad which is defined in mtl-2.2.2
package which I have installed as I checked with ghc-pkg list
.
When I tried to do import Control.Monad.Writer
in ghci
it is giving me an error.
I don't understand why?
Prelude> import Control.Monad.Writer
<no location info>: error:
Could not find module ‘Control.Monad.Writer’
Perhaps you meant
Control.Monad.Fail (from base-4.11.1.0)
Control.Monad.Fix (from base-4.11.1.0)
Control.Monad.Zip (from base-4.11.1.0)
来源:https://stackoverflow.com/questions/61500083/why-cant-i-import-control-monad-writer-while-i-have-mtl-2-2-2-installed