nomeata / ghc-heap-view

Extract the heap representation of Haskell values and thunks
BSD 3-Clause "New" or "Revised" License
50 stars 19 forks source link

Outdated installation instructions? #33

Open konsumlamm opened 3 years ago

konsumlamm commented 3 years ago

The package description says to cabal install the package and that that will explain how to add the :printHeap command. However, cabal install ghc-heap-view fails with current cabal, since the package provides no executable. Using cabal install --lib ghc-heap-view instead works (and installs the library globally), but it still doesn't provide instructions on how to add the :printHeap command. Manually adding the contents of the ghci file adds the command.

I suggest recommending the use of cabal install --lib and including the contents of the ghci file (only two lines of code) in the package description (and maybe also add a README.md that at least links to the Hackage page). Or maybe I'm missing something, but in any case, the installation instructions should be updated.

That being said, the package works very well for me, so thank you!

nomeata commented 3 years ago

The instructions are indeed from an old era where cabal worked differently.

I personally don’t use cabal install --lib, but rather

cabal install --env . --lib ghc-heap-view

to do it only locally, and then importing the ghci file manually.

But you are right, the README needs to be refined.