Why can't I import Control.Monad.Writer while I have mtl-2.2.2 installed?

你。 提交于 2021-02-05 10:49:47

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!