Why can't I import Control.Monad.Writer while I have mtl-2.2.2 installed?
问题 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:/