Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://www.haskell.org/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Re: Network.HTTP basics (Barbara Shirtcliff) 2. Dependence issue (Alexey G) 3. Re: Dependence issue (Krzysztof Skrz?tnicki) 4. Re: Dependence issue (Alexey G) ---------------------------------------------------------------------- Message: 1 Date: Fri, 01 Apr 2011 21:11:27 +0000 From: "Barbara Shirtcliff" <ba...@gmx.com> Subject: Re: [Haskell-beginners] Network.HTTP basics To: "Daniel Fischer" <daniel.is.fisc...@googlemail.com>,beginners@haskell.org Message-ID: <20110401211127.201...@gmx.com> Content-Type: text/plain; charset="utf-8" Yay! ? Thank you! > ----- Original Message ----- > From: Daniel Fischer > Sent: 04/01/11 02:04 PM > To: beginners@haskell.org > Subject: Re: [Haskell-beginners] Network.HTTP basics > > On Friday 01 April 2011 21:42:19, Barbara Shirtcliff wrote: > > Hi, this is small, but this is the beginners list, so here goes: > > > > I can see how to use HTTP to request a page. for example, this works: > > > > > > Prelude Network.HTTP> let respgoogle = simpleHTTP $ getRequest > > "http://google.com" Prelude Network.HTTP> respgoogle > > Right HTTP/1.1 301 Moved Permanently > > Location: http://www.google.com/ > > Content-Type: text/html; charset=UTF-8 > > Date: Fri, 01 Apr 2011 17:31:25 GMT > > Expires: Sun, 01 May 2011 17:31:25 GMT > > Cache-Control: public, max-age=2592000 > > Server: gws > > Content-Length: 219 > > X-XSS-Protection: 1; mode=block > > Connection: close > > > > that looks really nice, but hey, what if I want to see what's in the > > content? It isn't immediately clear to me from the documentation at > > http://hackage.haskell.org/packages/archive/HTTP/4000.1.1/doc/html/Netw > > ork-HTTP.html . > > stuff = do > ?answer <- respgoogle > ?case answer of > ?Left connErr -> putStrLn "Got a connection error:" >> print connErr > ?Right result -> do > ?let goodies = rspBody result > ?putStrLn goodies -- or do something sensible > > > > > In the end, I'll be working with JSON, here, but I need to know how to > > get to it, and the examples in the documentation don't work (i.e. don't > > appear to be up to date). I'm not very experienced with Haskell, so, > > it's pretty opaque. > > > > Thanks, > > Bar > > ------------------------------ Message: 2 Date: Sat, 2 Apr 2011 01:46:25 +0300 From: Alexey G <kreed...@gmail.com> Subject: [Haskell-beginners] Dependence issue To: beginners@haskell.org Message-ID: <AANLkTikegSFhpEMu7ws_C2YgLc=cunbo5ppzrjds_...@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" Hello. I have some trouble with HDBC-mysql package ( http://hackage.haskell.org/package/HDBC-mysql). It depends on base (<4), but in GHC 7 - base 4.3.1. I download a HDBC-mysql package and change dependence in .cabal file to base (<5). It works fine. But I want to build another package that depend on HDBC-mysql and cabal check dependencies from the hackage, where is HDBC-mysql depend on base (<4). What I should do? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20110402/dfc15b64/attachment-0001.htm> ------------------------------ Message: 3 Date: Sat, 2 Apr 2011 01:08:53 +0200 From: Krzysztof Skrz?tnicki <gte...@gmail.com> Subject: Re: [Haskell-beginners] Dependence issue To: Alexey G <kreed...@gmail.com> Cc: beginners@haskell.org Message-ID: <AANLkTimQGo3E+5r_RSt1pWsKjbOdM+r3=s-moxotz...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Changing the dependency isn't enough. You also want to bump the version number (say, A.B.C.D into A.B.C.D.1) and make your project depend on the bumped version. This way cabal wont find that version anywhere but in installed database and will continue just fine. If the library works fine under base-4 you might also contact the developer so that he can upload the new version which will allow you to drop that hack altogether. Working with such locally-changed versions can be easier if you try cabal-devel tool or similar. But I think might consider another solution: don't use that library. As HDBC docs<http://hackage.haskell.org/packages/archive/HDBC/2.2.6.1/doc/html/Database-HDBC.html>says: ODBC Available from http://software.complete.org/hdbc-odbc. Or, to partitipace in development, use git clone git://git.complete.org/hdbc-odbc MySQL MySQL users have two choices: the first is the ODBC driver, which works and has been tested against MySQL on both Linux/Unix and Windows platforms. There is also an *alpha-quality* native MySQL driver available for download at http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HDBC-mysql with a homepage at http://www.maubi.net/~waterson/hacks/hdbc-mysql.html. So clearly, HDBC developer(s?) think that HDBC-odbc is the way. Best regards, Krzysztof Skrz?tnicki On Sat, Apr 2, 2011 at 00:46, Alexey G <kreed...@gmail.com> wrote: > Hello. I have some trouble with HDBC-mysql package ( > http://hackage.haskell.org/package/HDBC-mysql). > It depends on base (<4), but in GHC 7 - base 4.3.1. > I download a HDBC-mysql package and change dependence in .cabal file to > base (<5). It works fine. > But I want to build another package that depend on HDBC-mysql and cabal > check dependencies from the hackage, where is HDBC-mysql depend on base > (<4). > > What I should do? > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20110402/3237844f/attachment-0001.htm> ------------------------------ Message: 4 Date: Sat, 2 Apr 2011 02:15:40 +0300 From: Alexey G <kreed...@gmail.com> Subject: Re: [Haskell-beginners] Dependence issue To: beginners@haskell.org Message-ID: <AANLkTi=h4WaEHz__uNL=mho5hlznc+zrr_7wnj5jb...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Thank you! I already rapport about this issue to the mantainer of HDBC-mysql. 2011/4/2 Krzysztof Skrz?tnicki <gte...@gmail.com> > Changing the dependency isn't enough. You also want to bump the version > number (say, A.B.C.D into A.B.C.D.1) and make your project depend on the > bumped version. This way cabal wont find that version anywhere but in > installed database and will continue just fine. > > If the library works fine under base-4 you might also contact the developer > so that he can upload the new version which will allow you to drop that hack > altogether. > > Working with such locally-changed versions can be easier if you try > cabal-devel tool or similar. > > But I think might consider another solution: don't use that library. As HDBC > docs<http://hackage.haskell.org/packages/archive/HDBC/2.2.6.1/doc/html/Database-HDBC.html>says: > > ODBC Available from http://software.complete.org/hdbc-odbc. Or, to > partitipace in development, use git clone git://git.complete.org/hdbc-odbc > MySQL MySQL users have two choices: the first is the ODBC driver, which > works and has been tested against MySQL on both Linux/Unix and Windows > platforms. There is also an *alpha-quality* native MySQL driver available > for download at > http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HDBC-mysql with > a homepage at http://www.maubi.net/~waterson/hacks/hdbc-mysql.html. > > So clearly, HDBC developer(s?) think that HDBC-odbc is the way. > > > Best regards, > Krzysztof Skrz?tnicki > > On Sat, Apr 2, 2011 at 00:46, Alexey G <kreed...@gmail.com> wrote: > >> Hello. I have some trouble with HDBC-mysql package ( >> http://hackage.haskell.org/package/HDBC-mysql). >> It depends on base (<4), but in GHC 7 - base 4.3.1. >> I download a HDBC-mysql package and change dependence in .cabal file to >> base (<5). It works fine. >> But I want to build another package that depend on HDBC-mysql and cabal >> check dependencies from the hackage, where is HDBC-mysql depend on base >> (<4). >> >> What I should do? >> >> _______________________________________________ >> Beginners mailing list >> Beginners@haskell.org >> http://www.haskell.org/mailman/listinfo/beginners >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20110402/181b0db1/attachment-0001.htm> ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 34, Issue 3 ****************************************