I'm working on a client/server Haste.App utility. In the server code I would like to use the pcap library.
The haste compiler is having trouble with :
import Network.Pcap
-----------------------------------------------------------------------
ghc --make showconn.hs
[1 of 1] Compiling Main ( showconn.hs, showconn.o )
Linking showconn ...
hastec showconn.hs
showconn.hs:17:8:
Could not find module `Network.Pcap'
Use -v to see a list of the files searched for.
make: *** [showconn.js] Error 1
-----------------------------------------------------------------------
I've tried:
-- reinstalling pcap : cabal install pcap
-- exposing pcap : haste-pkg expose pcap
-- rebooting haste : mv ~/.haste ~/.haste.old ; haste-boot --local
I'm working around this by using "#ifndef __HASTE__" to hide the problem code from hastec. With these ifdefs in place, the code compiles and works but it does not seem like a clean fix.
Is there a "right way" ( or possibly just a better way to fix this) ?
I'm using version 4.4.3 of the haste compiler which I got from github by cloning from github and then checking out tag 0.4.4.3 .
I'm using ghc 7.6.3 and cabal 1.20.0.3
My build machine is running Ubuntu 14.04
Thank you.