I'm trying to use liquidhaskell on NixOS. I can install the package (liquidhaskell-0.8.2.3), though not the cabal integration, because it requires cabal 1.18-1.25, but I have cabal 2.0.1.0 .
I have installed the liquidhaskell package as part of a ghc-with-packages setup:
[~:0]$ readlink $( type -p liquid )
/nix/store/pdbzl0p6k1klmajx969b6vvwyw9w0s6b-ghc-8.2.2-with-packages/bin/liquid
Among many others, the package text also installed in this set:
[proclib:1]$ ls -ld /nix/store/pdbzl0p6k1klmajx969b6vvwyw9w0s6b-ghc-8.2.2-with-packages/lib/ghc-8.2.2/text-1.2.2.2/
dr-xr-xr-x 3 root root 68 Jan 1 1970 /nix/store/pdbzl0p6k1klmajx969b6vvwyw9w0s6b-ghc-8.2.2-with-packages/lib/ghc-8.2.2/text-1.2.2.2/
However, liquid cannot see this:
[proclib:1]$ liquid ~/bin/h/nix.hs
LiquidHaskell Version 0.8.2.3
Copyright 2013-18 Regents of the University of California. All Rights Reserved.
liquid: Main: Could not find module ‘Data.Text’
Perhaps you meant Data.Set (from containers-0.5.10.2)
Use -v to see a list of the files searched for.
The above is not part of a cabal package (to try to eliminate the cabal thing from the equation).
I've tried playing with nix-shell to make this work, but either nix-shell or liquid break down on language pragmas:
[~:0]$ nix-shell -p myHaskellEnv --run liquid ~/bin/h/nix.hs
/nix/store/q1cwqhb6v8yx8vy4s5p6sxrq8s0bnqmy-nix.hs: line 5: {-#: command not found
Any help gratefully received.
--run "liquid ~/bin/h/nix.hs"
– Austreng