[Haskell-beginners] Fetching a URI
aditya.siram at gmail.com
Sun Apr 5 23:46:04 EDT 2009
At first I got the same error but when I installed HTTP-4000.0.5 using Cabal
your code worked.
On Sun, Apr 5, 2009 at 10:07 PM, Adam Keys <adamkkeys at gmail.com> wrote:
> I'm trying to write a wrapper for a REST service. However, I find myself
> stumped by the simplest part: merely performing a GET on a URI.
> I'm using the HTTP Cabal package. It specifies an example like so:
> simpleHTTP (getRequest "http://www.haskell.org/") >>= fmap (take 100) .
> However, it seems I'm either importing the library incorrectly or there is
> a discrepancy between the documentation and the library. I can't seem to
> call getRequest.
> :) ghc-pkg list
>> Cabal-22.214.171.124, HTTP-3001.1.3, HTTP-4000.0.4, Shellac-0.9.5,
>> GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help
>> Loading package base ... linking ... done.
>> Prelude> import Network.HTTP
>> Prelude Network.HTTP> :type getRequest
>> <interactive>:1:0: Not in scope: `getRequest'
> Am I missing something obvious here?
> Beginners mailing list
> Beginners at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners