[Haskell-cafe] Managing multiple installations of GHC

steffen steffen.siering at googlemail.com
Thu Dec 2 10:33:39 CET 2010


> On Dec 1, 2010, at 8:38 PM, Antoine Latter wrote:
>
> > If you're doing user installations of packages with 'cabal-install' it
> > will take care of everything - all of the things that it installs are
> > in per-GHC-version directories.
> ...
> > Except for the haddock documentation that cabal-install installs -
> > different versions of GHC/haddock are pretty much always breaking each
> > other when I switch back and forth.
>
> This is because cabal's default layout *doesn't* install everything in per-GHC-version directories. The layout is:
>
> <prefix>          -- /usr/local if --global, ~/.cabal if --user
>   bin             -- binaries ($bindir)
>   lib             -- ($libdir)
>     <pkgid>
>       <compiler>  -- libraries & .hi files ($libdir/$libsubdir, $dynlibdir)
>         include   -- include files ($includedir)
>   libexec         -- private binaries ($libexecdir)
>   share           -- ($datadir)
>     <pkgid>       -- data files ($datadir/$datasubdir)    
>     doc
>       <pkgid>     -- documentation ($docdir)
>         html      -- html doc ($htmldir, $haddockdir)
>     man           -- man pages ($mandir)
>
> Notice that only libraries, .hi files and includes are uner a per-compiler directory. All the other things aren't, and as you notice they clobber each other.
>
> I propose that the default in Cabal be changed to:
>
> <prefix>          -- /usr/local/haskell if --global, ~/.cabal if --user,
>   <compiler>
>     <pkgid>
>       bin         -- binaries ($bindir)
>       lib         -- libraries & .hi files ($libdir, $libdir/$libsubdir, $dynlibdir)
>         include   -- include files ($includedir)
>       libexec     -- private binaries ($libexecdir)
>       share       -- data files ($datadir, $datadir/$datasubdir)    
>       doc         -- documentation ($docdir)
>         html      -- html doc ($htmldir, $haddockdir)
>         man       -- man pages ($mandir)
>     bin           -- symlinks to binaries
>     doc
>       html        -- master index of html doc
>       man         -- symlinks to man pages
>   current         -- symlink to current <compiler>
>   bin             -- symlink to current/bin      
>   doc             -- symlink to current/doc
>
> This would put everything under a per-compiler top level dir, which is how most other language systems install (for example perl and python both do it this way) This would also allow very easy removal of an old compiler and everything that was installed for it. Removing packages is also easier: you just one <pkgid> dir per <compiler> to find and get rid of -- and you can do it with a wildcard!
>
+1



More information about the Haskell-Cafe mailing list