我正在尝试创建一个Request
值并收到以下错误:
ghci> :m +Network.HTTP Network.URI Data.Maybe
ghci> Request { rqURI = fromJust $ parseURI "http://www.google.com", rqMethod = GET, rqHeaders = [], rqBody = ""}
<interactive>:18:19:
Couldn't match expected type `network-2.3.1.0:Network.URI.URI'
with actual type `URI'
In the `rqURI' field of a record
In the expression:
Request
{rqURI = fromJust $ parseURI "http://www.google.com",
rqMethod = GET, rqHeaders = [], rqBody = ""}
In an equation for `it':
it
= Request
{rqURI = fromJust $ parseURI "http://www.google.com",
rqMethod = GET, rqHeaders = [], rqBody = ""}
cabal list network
显示以下内容:
* network
Synopsis: Low-level networking interface
Default available version: 2.4.0.1
Installed versions: 2.3.1.0, 2.4.0.1
Homepage: https://github.com/haskell/network
License: BSD3
从 Hackage 的文档中,我相信我创建的 URIparseURI
是Network.URI.URI
.
我在 OS X Mountain Lion 上运行 Haskell Platform 2012.4.0.0(64 位)。
这是我听说的“阴谋集团地狱”的一个例子吗?