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. Question about ghc and cabal: finding packages (C Gosch) 2. Re: Question about ghc and cabal: finding packages (Mathew de Detrich) 3. Re: Question about ghc and cabal: finding packages (Henk-Jan van Tuyl) 4. forM vs mapM (Gaius Hammond) 5. Re: forM vs mapM (Thomas Davie) 6. Re: forM vs mapM (Gaius Hammond) 7. Re: Question about ghc and cabal: finding packages (Jonas Almstr?m Dureg?rd) 8. Re: Question about ghc and cabal: finding packages (Daniel Fischer) ---------------------------------------------------------------------- Message: 1 Date: Thu, 19 Aug 2010 09:12:49 +0200 From: C Gosch <ch.go...@googlemail.com> Subject: [Haskell-beginners] Question about ghc and cabal: finding packages To: beginners@haskell.org Message-ID: <aanlktimn5n7hwaxr32kzg7h7j3n+4mj7aa6ak-gss...@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" Hi everyone, I have installed ghc 6.12.3 and the Haskell platform; now, when I install packages from hackage using cabal install <package-name>, they get installed in ~/.cabal, which is fair enough. However, when I call a runhaskell Setup.lhs configure that used to work on a different computer with the same software setup, ghc (or is it cabal?) complains that it cannot find the packages I have just installed. Checking again revealed that they are indeed installed, just not in the ghc installation directory, but under ~/.cabal. How can I tell cabal and/or ghc where to look for libraries? Thanks, again, for any help! Christian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/beginners/attachments/20100819/bea9f02d/attachment-0001.html ------------------------------ Message: 2 Date: Thu, 19 Aug 2010 07:57:50 +0000 From: Mathew de Detrich <dete...@gmail.com> Subject: Re: [Haskell-beginners] Question about ghc and cabal: finding packages To: C Gosch <ch.go...@googlemail.com> Cc: beginners@haskell.org Message-ID: <aanlktink1dp7h_jvpcni0nmk8guugukb82xciglcs...@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" If you install a package through cabal install, it will automatically register with GHC (it works the same way that gems works on ruby for example) Using runhaskell <commands> is whats used when manually building/configuring packages (for example creating archlinux packages from cabal packages from hackage) or when you are developing and creating cabal packages yourself (in other words, when you do cabal install, cabal internally does all the commands for configuring/checking dependencies/building and installing) So you should be able to use use the package instantly after you install it (you can also use ghc-pkg list to check all installed packages) On Thu, Aug 19, 2010 at 7:12 AM, C Gosch <ch.go...@googlemail.com> wrote: > Hi everyone, > I have installed ghc 6.12.3 and the Haskell platform; now, when I install > packages from hackage using > cabal install <package-name>, > they get installed in ~/.cabal, > which is fair enough. > However, when I call a > runhaskell Setup.lhs configure > that used to work on a different computer with the same software setup, > ghc (or is it cabal?) complains that it cannot find the packages I have > just installed. > Checking again revealed that they are indeed installed, just not in the ghc > installation directory, > but under ~/.cabal. > How can I tell cabal and/or ghc where to look for libraries? > > Thanks, again, for any help! > Christian > > > _______________________________________________ > 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/20100819/1f7f2e98/attachment-0001.html ------------------------------ Message: 3 Date: Thu, 19 Aug 2010 11:06:40 +0200 From: "Henk-Jan van Tuyl" <hjgt...@chello.nl> Subject: Re: [Haskell-beginners] Question about ghc and cabal: finding packages To: beginners@haskell.org, "C Gosch" <ch.go...@googlemail.com> Message-ID: <op.vhogxequpz0...@zen5.router.home> Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes On Thu, 19 Aug 2010 09:12:49 +0200, C Gosch <ch.go...@googlemail.com> wrote: > Hi everyone, > I have installed ghc 6.12.3 and the Haskell platform; now, when I install > packages from hackage using > cabal install <package-name>, > they get installed in ~/.cabal, > which is fair enough. > However, when I call a > runhaskell Setup.lhs configure > that used to work on a different computer with the same software setup, > ghc (or is it cabal?) complains that it cannot find the packages I have > just > installed. > Checking again revealed that they are indeed installed, just not in the > ghc > installation directory, > but under ~/.cabal. > How can I tell cabal and/or ghc where to look for libraries? > > Thanks, again, for any help! > Christian The command "cabal install " installs a package locally by default, whereas "runhaskell Setup" installs globally. When installing globally, the local packages are ignored. Regards, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html -- ------------------------------ Message: 4 Date: Thu, 19 Aug 2010 10:02:22 +0000 From: "Gaius Hammond" <ga...@gaius.org.uk> Subject: [Haskell-beginners] forM vs mapM To: "Haskell Beginners List" <beginners@haskell.org> Message-ID: <128061004-1282212139-cardhu_decombobulator_blackberry.rim.net-2030406...@bda240.bisx.produk.on.blackberry> Content-Type: text/plain Hi all, Can anyone give me an example of a situation where you would use forM but *not* mapM or vice versa? As far as I can see one is simply a flip of the other. Does forM make any guarantees about order of execution? Thanks, G ------------------ ------------------------------ Message: 5 Date: Thu, 19 Aug 2010 11:08:34 +0100 From: Thomas Davie <tom.da...@gmail.com> Subject: Re: [Haskell-beginners] forM vs mapM To: ga...@gaius.org.uk Cc: Haskell Beginners List <beginners@haskell.org> Message-ID: <8d722972-3edb-48ad-b853-061df513f...@gmail.com> Content-Type: text/plain; charset=us-ascii On 19 Aug 2010, at 11:02, Gaius Hammond wrote: > Hi all, > > > Can anyone give me an example of a situation where you would use forM but > *not* mapM or vice versa? As far as I can see one is simply a flip of the > other. Does forM make any guarantees about order of execution? Nope, no extra guarentees, just reverses the argument order. forM can look quite nice if you have a large function that you want to map... forM [someList] lots of large function here ... while mapM can look good if you have a small function... mapM simpleFunction [someList] They're also useful both ways round partially applied. Bob ------------------------------ Message: 6 Date: Thu, 19 Aug 2010 10:16:06 +0000 From: "Gaius Hammond" <ga...@gaius.org.uk> Subject: Re: [Haskell-beginners] forM vs mapM To: "Thomas Davie" <tom.da...@gmail.com> Cc: Haskell Beginners List <beginners@haskell.org> Message-ID: <712809430-1282212964-cardhu_decombobulator_blackberry.rim.net-7039081...@bda240.bisx.produk.on.blackberry> Content-Type: text/plain Thanks, I suspected that might be the case but it seemed too simple :-) Cheers, G ------------------ -----Original Message----- From: Thomas Davie <tom.da...@gmail.com> Date: Thu, 19 Aug 2010 11:08:34 To: <ga...@gaius.org.uk> Cc: Haskell Beginners List<beginners@haskell.org> Subject: Re: [Haskell-beginners] forM vs mapM On 19 Aug 2010, at 11:02, Gaius Hammond wrote: > Hi all, > > > Can anyone give me an example of a situation where you would use forM but > *not* mapM or vice versa? As far as I can see one is simply a flip of the > other. Does forM make any guarantees about order of execution? Nope, no extra guarentees, just reverses the argument order. forM can look quite nice if you have a large function that you want to map... forM [someList] lots of large function here ... while mapM can look good if you have a small function... mapM simpleFunction [someList] They're also useful both ways round partially applied. Bob ------------------------------ Message: 7 Date: Thu, 19 Aug 2010 13:19:26 +0200 From: Jonas Almstr?m Dureg?rd <jonas.dureg...@chalmers.se> Subject: Re: [Haskell-beginners] Question about ghc and cabal: finding packages To: C Gosch <ch.go...@googlemail.com> Cc: beginners@haskell.org Message-ID: <aanlktinjabxeyros8avfoxjtulwgiksru4ctcpk3b...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Try simply cabal configure in the directory where Setup.lhs (and your .cabal file) is located. /J On 19 August 2010 09:12, C Gosch <ch.go...@googlemail.com> wrote: > Hi everyone, > I have installed ghc 6.12.3 and the Haskell platform; now, when I install > packages from hackage using > cabal install <package-name>, > they get installed in ~/.cabal, > which is fair enough. > However, when I call a > runhaskell Setup.lhs configure > that used to work on a different computer with the same software setup, > ghc (or is it cabal?) complains that it cannot find the packages I have just > installed. > Checking again revealed that they are indeed installed, just not in the ghc > installation directory, > but under ~/.cabal. > How can I tell cabal and/or ghc where to look for libraries? > > Thanks, again, for any help! > Christian > > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners > > ------------------------------ Message: 8 Date: Thu, 19 Aug 2010 14:14:44 +0200 From: Daniel Fischer <daniel.is.fisc...@web.de> Subject: Re: [Haskell-beginners] Question about ghc and cabal: finding packages To: beginners@haskell.org Cc: C Gosch <ch.go...@googlemail.com> Message-ID: <201008191414.44647.daniel.is.fisc...@web.de> Content-Type: text/plain; charset="iso-8859-1" On Thursday 19 August 2010 13:19:26, Jonas Almström Duregård wrote: > Try simply > > cabal configure > > in the directory where Setup.lhs (and your .cabal file) is located. > > /J Or, to configure, build and install in one go, just `cabal install' in that directory. If you want to go the runhaskell Setup.[l]hs road, however, you have to pass the --user flag to runhaskell Setup.[l]hs configure if you need packages from your user db. Or you have to reinstall the cabal-installed packages globally (surprise: pass the --global flag to cabal install), perhaps set `user-install: False' in ~/.cabal/config if you want to have global installs by default. > > On 19 August 2010 09:12, C Gosch <ch.go...@googlemail.com> wrote: > > Hi everyone, > > I have installed ghc 6.12.3 and the Haskell platform; now, when I > > install packages from hackage using > > cabal install <package-name>, > > they get installed in ~/.cabal, > > which is fair enough. > > However, when I call a > > runhaskell Setup.lhs configure > > that used to work on a different computer with the same software > > setup, ghc (or is it cabal?) complains that it cannot find the > > packages I have just installed. > > Checking again revealed that they are indeed installed, just not in > > the ghc installation directory, > > but under ~/.cabal. > > How can I tell cabal and/or ghc where to look for libraries? > > > > Thanks, again, for any help! > > Christian > > ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 26, Issue 38 *****************************************