找不到模块‘Network.CGI’ 它是隐藏包‘cgi-3001.3.0.2@cgi-3001.3.0.2-6aj81ZorTUo7RA61f0LJa8’的成员

Could not find module ‘Network.CGI’ It is a member of the hidden package ‘cgi-3001.3.0.2@cgi-3001.3.0.2-6aj81ZorTUo7RA61f0LJa8’

我正在尝试使用 ghci repl 中的 liftIO 函数。

liftIO 似乎是在 cgi 的 Network.CGI module 中定义的。我尝试导入它,输入 :m Network.CGIimport Network.CGI,并得到以下错误

> :m Network.CGI

<no location info>: error:
    Could not find module ‘Network.CGI’
    It is a member of the hidden package ‘cgi-3001.3.0.2@cgi-3001.3.0.2-6aj81ZorTUo7RA61f0LJa8’.
Prelude Api.PesticideApplicationLog> import Network.CGI

如何导入 liftIO 以便在 ghci 中使用?

我试图从错误的模块导入 liftIO。

一个hoogle search for liftIO led me to Network.CGI, but the liftIO that I was looking for resides in Control.Monad.IO.Class.

导入命令

> :m Control.Monad.IO.Class

努力为我导入合适的 liftIO