[Haskell-beginners] apt cabal hackage
Amy de Buitléir
amy at nualeargais.ie
Wed Sep 21 17:37:40 CEST 2011
Anuradha L <csmagic <at> gmail.com> writes:
> 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
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
> 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?
More information about the Beginners