Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Halive not finding any installed libraries #19

Closed
pikajude opened this issue Jan 5, 2017 · 8 comments
Closed

Halive not finding any installed libraries #19

pikajude opened this issue Jan 5, 2017 · 8 comments

Comments

@pikajude
Copy link
Contributor

pikajude commented Jan 5, 2017

$ halive src/Main.hs src
[stuff...]
src/StaticFiles/Delegated.hs:10:1: error:
    Failed to load interface for ‘Data.Text’
    Perhaps you meant Data.Set (from containers-0.5.7.1)
    Use -v to see a list of the files searched for.
src/StaticFiles/Delegated.hs:11:1: error:
    Failed to load interface for ‘Data.Text.Lazy’
    Perhaps you meant
      Data.Map.Lazy (from containers-0.5.7.1)
      Data.STRef.Lazy (from base-4.9.0.0)
    Use -v to see a list of the files searched for.
src/StaticFiles/Delegated.hs:12:1: error:
    Failed to load interface for ‘Data.Text.Lazy.Encoding’
    Use -v to see a list of the files searched for.
src/StaticFiles/Delegated.hs:15:1: error:
    Failed to load interface for ‘System.Process.ByteString.Lazy’
    Use -v to see a list of the files searched for.
$ ghci
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /Users/jude/.dotfiles/ghci
λ import Data.Text
λ :t pack "foo"
pack "foo" ∷ Text

What's going on?

@lukexi
Copy link
Owner

lukexi commented Jan 5, 2017

Are you using cabal or stack? I haven't tested with cabal in a while, maybe something broke...

@pikajude
Copy link
Contributor Author

pikajude commented Jan 5, 2017

cabal. I'm not using a sandbox though. This is a nix dev environment, so ghc-pkg and friends are wrapped with a script that sets the --global-package-db.

@lukexi
Copy link
Owner

lukexi commented Jan 5, 2017 via email

@pikajude
Copy link
Contributor Author

pikajude commented Jan 6, 2017

A flag? Couldn't this be fallback behavior in case a cabal sandbox or stack aren't found?

@lukexi
Copy link
Owner

lukexi commented Jan 6, 2017

Sorry, I haven't used nix — I mean halive needs to know where your global package db is but you're right that it would be more nicely implemented as an automatic behavior. Normally I get this with ghc-paths and then add the cabal and stack sandbox directories if found. Is there a shell command or environment variable I can query for where nix is keeping your package-db?

@pikajude
Copy link
Contributor Author

pikajude commented Jan 6, 2017 via email

@pikajude
Copy link
Contributor Author

pikajude commented Jan 6, 2017

#20

@lukexi
Copy link
Owner

lukexi commented Jan 6, 2017

Excellent, thanks for doing that!

@lukexi lukexi closed this as completed Jan 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants