Haskell reinstall base with profiling enabled
Asked Answered
M

2

19

I am trying reinstall my Haskell libraries with profiling enabled by following the instructions listed here

However, whenever cabal attempts to reinstall one of the libraries I get the following message:

LibraryNameHere.hs:1:1:
    Could not find module `Prelude'
    Perhaps you haven't installed the profiling libraries for package `base'?
    Use -v to see a list of the files searched for.

When I try to reinstall base with profiling enabled I get the following messages:

me@machine:~/.cabal/$ cabal install -p base
Resolving dependencies...
All the requested packages are already installed:
base-4.5.0.0
Use --reinstall if you want to reinstall anyway.
me@machine:~/.cabal/$ cabal install --reinstall -p base
Resolving dependencies...
cabal: Could not resolve dependencies:
next goal: base (user goal)
rejecting: base-4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0,
4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0 (only already
installed instances can be used)
rejecting: base-3.0.3.2 (conflict: base => base>=4.0 && <4.3)
rejecting: base-3.0.3.1 (conflict: base => base>=4.0 && <4.2)

How do I reinstall base with profiling enabled?

Milanmilanese answered 3/5, 2014 at 22:43 Comment(2)
In general, reinstalling base is not recommended. A profiling library for base should have come with GHC. Perhaps you didn't install -prof packages?Achromic
@MikhailGlushenkov Facepalm, sudo apt-get install ghc-prof. Problem solved!Milanmilanese
M
18

If the base profiling libraries were not included in the your Haskell/GHC installation by default, they will be included through your OS's package manager in a separate package.

Debian Linux Systems:

sudo apt-get install ghc-prof

Milanmilanese answered 30/7, 2015 at 15:26 Comment(1)
I am getting the same "module not found" errors after installing ghc-prof.Overly
E
-3

Try

cabal update
cabal install ghc-prof
Embouchure answered 13/10, 2016 at 5:28 Comment(1)
The ghc-prof Cabal package is a parsing library and has nothing to do with this question.Rubricate

© 2022 - 2024 — McMap. All rights reserved.