0
votes

I have a Haskell package that is built and installed with Cabal. Running cabal repl in the package directory works perfectly, all the module imports work, etc. When I try to use the package in another directory, imports do not complain, but when I try to use a function from the file, I get this error in GHCi

λ> import Data.Frame
λ> import Data.Frame.CSV
λ> :t fromCsvHeaders
/Users/Stian/.cabal/lib/x86_64-osx-ghc-7.8.3/frame-0.1.0.0/Data/Frame/CSV.dyn_hi
Declaration for fromCsvHeaders:
  Failed to load interface for ‘Data.Frame.Internal’
  Perhaps you haven't installed the "dyn" libraries for package ‘frame-0.1.0.0’?
  Use -v to see a list of the files searched for.
Cannot continue after interface file error

The same happens when running ghc.

1
frame was not built with --enable-shared, and some package that depends on 'frame' was built with --enable-shared. This is the problem - the solution is reinstall 'frame' with --enable-shared, or whatever depends on frame without it.user2407038

1 Answers

1
votes

Turns out in this case there was an internal module that had not been exposed in the cabal file.