Chris W.
Chris W.

Reputation: 1670

Why is package hidden by default? And how can I "unhide" it?

I'm running Ubuntu 10.10, and I have the transformers module installed via the Ubuntu package libghc6-transformers-dev. For some reason, this package is hidden by default:

ghc --make -i./src/ src/fastcgi.hs -o myapp.fcgi

src/MyApp/Webapp.hs:6:7:
    Could not find module `Control.Monad.IO.Class':
      It is a member of the hidden package `transformers-0.2.1.0'.
      Use -v to see a list of the files searched for.

So, my first question is, "why?". And my second question is, what is the proper way to "unhide" this module (without needing to explicitly specify the module via command-line)? And is that a good/bad idea to do?

Note, I am able to get ghc to compile by passing the package name explicitly, like so:

ghc --make -package transformers -i./src/ src/fastcgi.hs -o myapp.fcgi

Upvotes: 10

Views: 2933

Answers (2)

Matthias Braun
Matthias Braun

Reputation: 34343

When building with Stack, add transformers as a dependency to your package.yml file:

dependencies:
- base >= 4.7 && < 5
- transformers

This fixed the problem permanently for me.

Upvotes: 0

Paul Johnson
Paul Johnson

Reputation: 17786

Use the ghc-pkg tool from the command line:

ghc-pkg expose transformers

Why it was hidden by default I don't know. It may be something to take up with the Ubuntu package maintainers.

Also,

ghc-pkg help

will tell you a lot more about this program.

Upvotes: 7

Related Questions