Skip to content

Instantly share code, notes, and snippets.

@mgsloan
Created March 30, 2015 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgsloan/6eb77382be523ad04137 to your computer and use it in GitHub Desktop.
Save mgsloan/6eb77382be523ad04137 to your computer and use it in GitHub Desktop.
mgsloan@computer:~/fpco/ghc-7.10-sandbox$ hsenv --ghc=../ghc-7.10.1.tar.xz
Creating Virtual Haskell directory structure
Installing GHC
Installing GHC from ../ghc-7.10.1.tar.xz
Initializing GHC Package database at /home/mgsloan/fpco/ghc-7.10-sandbox/.hsenv/ghc_pkg_db
Copying necessary packages from original GHC package database
Using user-wide (~/.cabal/packages) Hackage download cache directory
Installing cabal config at /home/mgsloan/fpco/ghc-7.10-sandbox/.hsenv/cabal/config
Installing activate script
Installing cabal wrapper using /home/mgsloan/fpco/ghc-7.10-sandbox/.hsenv/cabal/config at /home/mgsloan/fpco/ghc-7.10-sandbox/.hsenv/bin/cabal
Skipping 'cabal update' step, Hackage download cache already downloaded
to ~/.cabal/packages/. You can update it manually with 'cabal update'
(from inside or outside the virtual environment).
To activate the new environment use 'source .hsenv/bin/activate'
mgsloan@computer:~/fpco/ghc-7.10-sandbox$ source .hsenv/bin/activate
Activating Virtual Haskell Environment (at /home/mgsloan/fpco/ghc-7.10-sandbox).
Use regular Haskell tools (ghc, ghci, ghc-pkg, cabal) to manage your Haskell environment.
To exit from this virtual environment, enter command 'deactivate_hsenv'.
[hsenv]mgsloan@computer:~/fpco/ghc-7.10-sandbox$ runhaskell Test.hs
/home/mgsloan/fpco/ghc-7.10-sandbox/.hsenv/ghc_pkg_db/package.cache: GHC.PackageDb.readPackageDb: inappropriate type (not a ghc-pkg db file, wrong file magic number)
@mgsloan
Copy link
Author

mgsloan commented Mar 30, 2015

For folks that ended up here by searching orso, I figured out how to fix my hsenv:

rm .hsenv/ghc_pkg_db/package.cache
cp .hsenv/ghc/lib/ghc-7.10.1/package.conf.d/package.cache .hsenv/ghc_pkg_db/package.cache

@jsantos17
Copy link

@mgsloan Thanks! That was really useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment