0

I'm trying to build my own cabal package, where one of the modules use Control.Monad.State, but I get the following error:

executable/Example.hs:5:8:
    Could not find module `Control.Monad.State'
    It is a member of the hidden package `mtl-2.1.2'.
    Perhaps you need to add `mtl' to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.

I have added mtl to the build-depends without success. I read about others having issues when building for profiling and mtl wasn't built for that, but I shouldn't be building for profiling. I have both library-profiling and executable-profiling explicitly set to False in ~/.cabal/config.

I'm on Mac OS

duplode
  • 33,731
  • 7
  • 79
  • 150
jswetzen
  • 688
  • 1
  • 4
  • 15
  • 1
    We'll probably need to see your Cabal file, or at the very least the `build-depends` section of it. Could you add that to your question? – Antal Spector-Zabusky Feb 04 '14 at 10:46
  • 2
    As I was adding my Cabal file, I noticed that I had put mtl in my **library** build-depends, but **not** in my **executable** build-depends! That was it! Thanks for making me look even closer at my Cabal file, even though I have been staring at it over and over again already! – jswetzen Feb 04 '14 at 15:14

0 Answers0