<div dir="ltr">Hi Stuart,<div>I was going to suggest the same as Roman, this is a "known problem" on Windows. But the good news is that withSocketsDo is implemented as "id"</div><div>if you are on Unix, so you could still write multi platform programs without worrying about platforms and preprocessor flags.</div>
<div><br></div><div>Hope this helps!</div><div><br></div><div>Alfredo</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 21 January 2014 23:14, Roman Cheplyaka <span dir="ltr"><<a href="mailto:roma@ro-che.info" target="_blank">roma@ro-che.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It looks like you haven't initialized the networking subsystem. See<br>
<a href="http://hackage.haskell.org/package/network-2.4.2.2/docs/Network.html#g:2" target="_blank">http://hackage.haskell.org/package/network-2.4.2.2/docs/Network.html#g:2</a><br>
<br>
* Stuart Mills <<a href="mailto:stuartallenmills@gmail.com">stuartallenmills@gmail.com</a>> [2014-01-21 14:39:36-0800]<br>
<div><div class="h5">> Here is the source by the way:<br>
> {-# LANGUAGE OverloadedStrings #-}<br>
><br>
> import Network.HTTP.Conduit (simpleHttp)<br>
> import qualified Data.Text as T<br>
> import Text.HTML.DOM (parseLBS)<br>
> import Text.XML.Cursor (Cursor, attributeIs, content, element,<br>
> fromDocument, child,<br>
>                         ($//), (&|), (&//), (>=>))<br>
><br>
> -- The URL we're going to search<br>
> url = "<a href="http://www.bing.com/search?q=school+of+haskell" target="_blank">http://www.bing.com/search?q=school+of+haskell</a>"<br>
><br>
> -- The data we're going to search for<br>
> findNodes :: Cursor -> [Cursor]<br>
> findNodes = element "span" >=> attributeIs "id" "count" >=> child<br>
><br>
> -- Extract the data from each node in turn<br>
> extractData = T.concat . content<br>
><br>
> -- Process the list of data elements<br>
> processData =  putStrLn . T.unpack . T.concat<br>
><br>
> cursorFor :: String -> IO Cursor<br>
> cursorFor u = do<br>
>      page <- simpleHttp u<br>
>      return $ fromDocument $ parseLBS page<br>
><br>
> -- test<br>
> main = do<br>
>      cursor <- cursorFor url<br>
>      processData $ cursor $// findNodes &| extractData<br>
><br>
><br>
> On Tuesday, January 21, 2014 2:10:19 PM UTC-8, Stuart Mills wrote:<br>
> ><br>
> > I copied and pasted some html parsing demo source from FP School.<br>
> ><br>
> > While the code works on the FP demo site (in the IDE), I get the following<br>
> > error on my Windows 7 64 bit:<br>
> ><br>
> > InternalIOException getAddrInfo: does not exist (error 10093).<br>
> ><br>
> > Thanks<br>
> ><br>
> ><br>
> ><br>
<br>
</div></div>> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>