
Can anyone point me to a tutorial or howto on haskell package management under debian/ubuntu? Some of the things that are making my head spin... How when to use hackage/cabal? And when apt? How to translate haskell internal names (ie names given to import) to package names ie either cabal or apt names? Global (/usr) vs local (under $HOME) packages and figuring out paths Thanks

Anuradha L
Can anyone point me to a tutorial or howto on haskell package management under
debian/ubuntu?Some of the things that are making my head spin...How when to use hackage/cabal? And when apt? The conventional wisdom seems to be that if your distro provides the package, you should install it using your distro's package management system. Otherwise, install it using Cabal.
How to translate haskell internal names (ie names given to import) to package names ie either cabal or apt names?
Say for example that you want to use ConfigFile in your code, but you're not sure where it is. Go to either Hayoo (http://holumbus.fh-wedel.de/hayoo/hayoo.html) or Hoogle (http://haskell.org/hoogle/) and search for "ConfigFile". When the search results appear, click on the one that you want, and at the top of the page, you'll find the name of the package, with the most recent version of that package. As I write this, the package containing ConfigFile is ConfigFile-1.0.6. If you don't have that installed, you would need (in this example) to do "cabal install ConfigFile" before you could use that package. Now the next question is: What do you import. On that same web page (which you got to by searching Hayoo or Hoogle), you'll see the fully qualified Haskell module name: Data.ConfigFile. So in your code, you would need "import Data.ConfigFile".
Global (/usr) vs local (under $HOME) packages and figuring out pathsThanks
I'm not quite sure what you're asking. Are you looking for the path to the source code or documentation of something you installed using Cabal?

Anuradha L wrote:
Can anyone point me to a tutorial or howto on haskell package management under debian/ubuntu?
Don't know if there is one.
Some of the things that are making my head spin...
How when to use hackage/cabal? And when apt?
Opinions will vary, but my advice is to use your distribution's package manager where possible, and where not possible, file bug reports to get packages added. I filed a bug report requesting weighted-regexp, and a package was uploaded to Debian unstable less than 24 hours later. Debian has a very responsive haskell maintainence team whose main issue is identifying remaining good packages in hackage that have not gotten packaged yet. I use cabal if I'm not on a development machine (so Debian stable rather than unstable), and need a newer version of something. The way Debian packages haskell packages lets cabal know about them, so it interoperates nicely.
How to translate haskell internal names (ie names given to import) to package names ie either cabal or apt names?
To find what package contains a module I typically use Hayoo. http://holumbus.fh-wedel.de/hayoo/hayoo.html#0:Data.Text From hackage to debian package name there is a simple transformation before ghc7, use libghc6-<hackagename>-dev ghc7 and above, use libghc-<hackagename>-dev
Global (/usr) vs local (under $HOME) packages and figuring out paths
Opinions will probably vary, I don't like installing system wide software outside the control of my distribution's package manager and so have only used cabal inside HOME. -- see shy jo

Thanks Joey, Amy Now I want to go 'backwards'. For example I have Language.Haskell.Exts.Syntax I want to dig into it. Where/How do I start?

csmagic
Thanks Joey, AmyNow I want to go 'backwards'.For example I have Language.Haskell.Exts.SyntaxI want to dig into it. Where/How do I start?
Using either Hayoo or Hoogle, search for "Language.Haskell.Exts.Syntax". Click on the results to find out more about this module (what package it's in, what methods it contains, etc.) Does that answer your question?

On Thu, Sep 22, 2011 at 4:20 PM, Amy de Buitléir
csmagic
writes: Thanks Joey, AmyNow I want to go 'backwards'.For example I have Language.Haskell.Exts.SyntaxI want to dig into it. Where/How do I start?
Using either Hayoo or Hoogle, search for "Language.Haskell.Exts.Syntax". Click on the results to find out more about this module (what package it's in, what methods it contains, etc.) Does that answer your question?
Ok Thanks Amy. Language.C was not working yesterday and is working now today. Maybe I mistyped something Now I find that I am directed to do at page http://trac.sivity.net/language_c/wiki/GettingStarted module Main where import Language.C import Language.C.System.GCC -- preprocessor used main = parseMyFile "test.c" >>= printMyAST Whats with the double import? Does not the contents of Language.C get imported when that is imported? [Note this is not so much a question specific to Language.C as to the general nature of module namespace structuring in Haskell]

On Thursday 22 September 2011, 20:18:53, csmagic wrote:
Now I find that I am directed to do at page http://trac.sivity.net/language_c/wiki/GettingStarted
module Main where import Language.C import Language.C.System.GCC -- preprocessor used main = parseMyFile "test.c" >>= printMyAST
Whats with the double import? Does not the contents of Language.C get imported when that is imported?
Only if Language.C.System.GCC re-exports Language.C. By default, nothing (except instance of type classes) imported from another module is re-exported, so if you want to use things from both, you have to import both (thus you have more fine-grained control of what is in scope in your module). If you want to re-export things from an imported module (because using your module wouldn't be convenient without some stuff defined elsewhere), you have to include what you want to re-export in the export list of your module, module Mine (module Imported.Module, local, stuff) where re-exports the entire imported module, to re-export only certain entities, list them individually.

On Thu, Sep 22, 2011 at 4:20 PM, Amy de Buitléir
csmagic
writes: Thanks Joey, AmyNow I want to go 'backwards'.For example I have Language.Haskell.Exts.SyntaxI want to dig into it. Where/How do I start?
Using either Hayoo or Hoogle, search for "Language.Haskell.Exts.Syntax". Click on the results to find out more about this module (what package it's in, what methods it contains, etc.) Does that answer your question?
Trying out the graphviz package... $ cabal list|grep -i graphviz gives cabal: <stdout>: invalid argument and nothing else But still $ cabal install graphviz still seems to install What gives?

On Fri, Sep 23, 2011 at 10:42 PM, csmagic
On Thu, Sep 22, 2011 at 4:20 PM, Amy de Buitléir
wrote: csmagic
writes: Thanks Joey, AmyNow I want to go 'backwards'.For example I have Language.Haskell.Exts.SyntaxI want to dig into it. Where/How do I start?
Using either Hayoo or Hoogle, search for "Language.Haskell.Exts.Syntax". Click on the results to find out more about this module (what package it's in, what methods it contains, etc.) Does that answer your question?
Trying out the graphviz package...
$ cabal list|grep -i graphviz gives cabal: <stdout>: invalid argument and nothing else
Your example works great for me. What OS are you using, and what version of cabal? You could also try:
cabal list graphviz
But that doesn't give you all of the power of regular expressions.
But still $ cabal install graphviz still seems to install
What gives?

On Sat, Sep 24, 2011 at 10:45 AM, Antoine Latter
On Fri, Sep 23, 2011 at 10:42 PM, csmagic
wrote: On Thu, Sep 22, 2011 at 4:20 PM, Amy de Buitléir
wrote:
csmagic
writes: Thanks Joey, AmyNow I want to go 'backwards'.For example I have Language.Haskell.Exts.SyntaxI want to dig into it. Where/How do I start?
Using either Hayoo or Hoogle, search for "Language.Haskell.Exts.Syntax". Click on the results to find out more about this module (what package it's in,
what
methods it contains, etc.) Does that answer your question?
Trying out the graphviz package...
$ cabal list|grep -i graphviz gives cabal: <stdout>: invalid argument and nothing else
Your example works great for me. What OS are you using, and what version of cabal?
You could also try:
cabal list graphviz
But that doesn't give you all of the power of regular expressions.
$ cabal --version cabal-install version 0.10.2 using version 1.10.1.0 of the Cabal library [I just did a cabal update cabal. Did not do anything as far as I can see] $ uname -rv 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011 $ cat /etc/debian_version wheezy/sid On a related note I find a lot of libghc6-something-or-other which are all described as dummy packages. Is Debian not the best system to play around with Haskell? I gather gentoo is where the most haskell development happens...
But still $ cabal install graphviz still seems to install
What gives?

On Sat, Sep 24, 2011 at 12:43 AM, csmagic
On Sat, Sep 24, 2011 at 10:45 AM, Antoine Latter
wrote: On Fri, Sep 23, 2011 at 10:42 PM, csmagic
wrote: On Thu, Sep 22, 2011 at 4:20 PM, Amy de Buitléir
wrote: csmagic
writes: Thanks Joey, AmyNow I want to go 'backwards'.For example I have Language.Haskell.Exts.SyntaxI want to dig into it. Where/How do I start?
Using either Hayoo or Hoogle, search for "Language.Haskell.Exts.Syntax". Click on the results to find out more about this module (what package it's in, what methods it contains, etc.) Does that answer your question?
Trying out the graphviz package...
$ cabal list|grep -i graphviz gives cabal: <stdout>: invalid argument and nothing else
Your example works great for me. What OS are you using, and what version of cabal?
You could also try:
cabal list graphviz
But that doesn't give you all of the power of regular expressions.
My only guess is that something is odd about your terminal - I've never seen that error message before, on linux or anywhere else.
$ cabal --version cabal-install version 0.10.2 using version 1.10.1.0 of the Cabal library
[I just did a cabal update cabal. Did not do anything as far as I can see]
$ uname -rv 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011
$ cat /etc/debian_version wheezy/sid
On a related note I find a lot of libghc6-something-or-other which are all described as dummy packages.
Is Debian not the best system to play around with Haskell? I gather gentoo is where the most haskell development happens...
I used to do Haskell development on Ubuntu - I would install the base libraries from apt, and then use 'cabal' user installs to do the rest. These days I work on a Mac, where I start with the Haskell Platform installer. There's an active Debian+Haskell group; I don't know much about gentoo (maybe they don't advertise as much). Sorry I couldn't be of much help with the odd error. Antoine

On Sat, Sep 24, 2011 at 11:25 AM, Antoine Latter
On Sat, Sep 24, 2011 at 12:43 AM, csmagic
wrote: On Sat, Sep 24, 2011 at 10:45 AM, Antoine Latter
wrote: On Fri, Sep 23, 2011 at 10:42 PM, csmagic
wrote: On Thu, Sep 22, 2011 at 4:20 PM, Amy de Buitléir
wrote: csmagic
writes: Thanks Joey, AmyNow I want to go 'backwards'.For example I have Language.Haskell.Exts.SyntaxI want to dig into it. Where/How do I start?
Using either Hayoo or Hoogle, search for "Language.Haskell.Exts.Syntax". Click on the results to find out more about this module (what package it's in, what methods it contains, etc.) Does that answer your question?
Trying out the graphviz package...
$ cabal list|grep -i graphviz gives cabal: <stdout>: invalid argument and nothing else
Your example works great for me. What OS are you using, and what version of cabal?
You could also try:
cabal list graphviz
But that doesn't give you all of the power of regular expressions.
My only guess is that something is odd about your terminal - I've never seen that error message before, on linux or anywhere else.
It seems to be happening elsewhere also: http://hackage.haskell.org/trac/hackage/ticket/856 Also its more likely a locale issue than a terminal one because I get the same error when I replace the pipe with a redirection to a file. And yet my locales dont seem to be odd in any way (I can see) $ locale LANG=en_US LANGUAGE= LC_CTYPE="en_US" LC_NUMERIC="en_US" LC_TIME="en_US" LC_COLLATE="en_US" LC_MONETARY="en_US" LC_MESSAGES="en_US" LC_PAPER="en_US" LC_NAME="en_US" LC_ADDRESS="en_US" LC_TELEPHONE="en_US" LC_MEASUREMENT="en_US" LC_IDENTIFICATION="en_US" LC_ALL= $ locale -a C C.UTF-8 en_US en_US.iso88591 en_US.iso885915 en_US.utf8 POSIX
$ cabal --version cabal-install version 0.10.2 using version 1.10.1.0 of the Cabal library
[I just did a cabal update cabal. Did not do anything as far as I can see]
$ uname -rv 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011
$ cat /etc/debian_version wheezy/sid
On a related note I find a lot of libghc6-something-or-other which are all described as dummy packages.
Is Debian not the best system to play around with Haskell? I gather gentoo is where the most haskell development happens...
I used to do Haskell development on Ubuntu - I would install the base libraries from apt, and then use 'cabal' user installs to do the rest. These days I work on a Mac, where I start with the Haskell Platform installer.
There's an active Debian+Haskell group; I don't know much about gentoo (maybe they don't advertise as much).
Sorry I couldn't be of much help with the odd error.
Antoine

On Sat, Sep 24, 2011 at 1:10 AM, csmagic
It seems to be happening elsewhere also: http://hackage.haskell.org/trac/hackage/ticket/856
Also its more likely a locale issue than a terminal one because I get the same error when I replace the pipe with a redirection to a file.
And yet my locales dont seem to be odd in any way (I can see)
$ locale LANG=en_US LANGUAGE= LC_CTYPE="en_US" LC_NUMERIC="en_US" LC_TIME="en_US" LC_COLLATE="en_US" LC_MONETARY="en_US" LC_MESSAGES="en_US" LC_PAPER="en_US" LC_NAME="en_US" LC_ADDRESS="en_US" LC_TELEPHONE="en_US" LC_MEASUREMENT="en_US" LC_IDENTIFICATION="en_US" LC_ALL=
I would expect a unicode locale to look something like this: http://www.madboa.com/geek/utf8/ So I'm guessing something is not set-up right for unicode output, and at least one of the Cabal package descriptions includes unicode output.
$ locale -a C C.UTF-8 en_US en_US.iso88591 en_US.iso885915 en_US.utf8 POSIX
$ cabal --version cabal-install version 0.10.2 using version 1.10.1.0 of the Cabal library
[I just did a cabal update cabal. Did not do anything as far as I can see]
$ uname -rv 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011
$ cat /etc/debian_version wheezy/sid
On a related note I find a lot of libghc6-something-or-other which are all described as dummy packages.
Is Debian not the best system to play around with Haskell? I gather gentoo is where the most haskell development happens...
I used to do Haskell development on Ubuntu - I would install the base libraries from apt, and then use 'cabal' user installs to do the rest. These days I work on a Mac, where I start with the Haskell Platform installer.
There's an active Debian+Haskell group; I don't know much about gentoo (maybe they don't advertise as much).
Sorry I couldn't be of much help with the odd error.
Antoine
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

On Sat, Sep 24, 2011 at 12:16 PM, Antoine Latter
On Sat, Sep 24, 2011 at 1:10 AM, csmagic
wrote: It seems to be happening elsewhere also: http://hackage.haskell.org/trac/hackage/ticket/856
Also its more likely a locale issue than a terminal one because I get the same error when I replace the pipe with a redirection to a file.
And yet my locales dont seem to be odd in any way (I can see)
$ locale LANG=en_US LANGUAGE= LC_CTYPE="en_US" LC_NUMERIC="en_US" LC_TIME="en_US" LC_COLLATE="en_US" LC_MONETARY="en_US" LC_MESSAGES="en_US" LC_PAPER="en_US" LC_NAME="en_US" LC_ADDRESS="en_US" LC_TELEPHONE="en_US" LC_MEASUREMENT="en_US" LC_IDENTIFICATION="en_US" LC_ALL=
I would expect a unicode locale to look something like this:
http://www.madboa.com/geek/utf8/
So I'm guessing something is not set-up right for unicode output, and at least one of the Cabal package descriptions includes unicode output.
Yeah thats it: $ export LANG=en_US.UTF-8 $ cabal list |grep -i graphviz * graphviz Synopsis: Bindings to Graphviz for graph visualisation. Homepage: http://projects.haskell.org/graphviz/ Synopsis: Generate graphviz-code from Haskell-code. Homepage: http://www.github.com/finnsson/hs2graphviz Synopsis: A library for the analysis and creation of Graphviz DOT files Synopsis: Convert GHC profiles into GraphViz's dot format Synopsis: Generates graphviz file of scons dependency information Synopsis: Visualize live Haskell data structures using vacuum, graphviz and Synopsis: Visualize live Haskell data structures using vacuum, graphviz and $ export LANG=en_US $ cabal list |grep -i graphviz cabal: <stdout>: invalid argument $

On Sat, Sep 24, 2011 at 12:33 PM, csmagic
On Sat, Sep 24, 2011 at 12:16 PM, Antoine Latter
wrote: On Sat, Sep 24, 2011 at 1:10 AM, csmagic
wrote: It seems to be happening elsewhere also: http://hackage.haskell.org/trac/hackage/ticket/856
Also its more likely a locale issue than a terminal one because I get
the
same error when I replace the pipe with a redirection to a file.
And yet my locales dont seem to be odd in any way (I can see)
$ locale LANG=en_US LANGUAGE= LC_CTYPE="en_US" LC_NUMERIC="en_US" LC_TIME="en_US" LC_COLLATE="en_US" LC_MONETARY="en_US" LC_MESSAGES="en_US" LC_PAPER="en_US" LC_NAME="en_US" LC_ADDRESS="en_US" LC_TELEPHONE="en_US" LC_MEASUREMENT="en_US" LC_IDENTIFICATION="en_US" LC_ALL=
I would expect a unicode locale to look something like this:
http://www.madboa.com/geek/utf8/
So I'm guessing something is not set-up right for unicode output, and at least one of the Cabal package descriptions includes unicode output.
Yeah thats it:
<snipped> Now with cabal working a little better I see that I have a cabal installed uniplate And now I also find a uniplate in the debian apt repos How do I uninstall the cabal one and switch to the apt one?

On Sat, Sep 24, 2011 at 01:43, csmagic
On a related note I find a lot of libghc6-something-or-other which are all described as dummy packages.
That just means you've upgraded from a time when there were a bunch of separate packages that have since been merged. The dummy packages contain nothing but dependencies on the new ones; it should be safe to remove them at this point, and I think apt may have an option to identify and remove them automatically but it's safest to verify the list it comes up with, just in case. (I'm on the Mac now, so can't easily check.) -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
participants (7)
-
Amy de Buitléir
-
Antoine Latter
-
Anuradha L
-
Brandon Allbery
-
csmagic
-
Daniel Fischer
-
Joey Hess