GaloisInc / HaLVM

The Haskell Lightweight Virtual Machine (HaLVM): GHC running on Xen
BSD 3-Clause "New" or "Revised" License
1.05k stars 88 forks source link

Shouldn't need `ghc` and `ghc-pkg` on path to use `halvm-cabal haddock`? #104

Open ntc2 opened 7 years ago

ntc2 commented 7 years ago

Even though Halvm ships its own versions of ghc, ghc-pkg, and haddock, the Halvm-shipped haddock requires a system ghc and ghc-pkg on the path. This seems like a bug.

dmjio commented 7 years ago

I agree, it does seem like a bug. Now that we have gotten away from the HaLVM platform, I wonder if it would be OK to remove halvm-cabal entirely. If an end-user supplies a cabal, maybe we can instruct them to simply:

cabal configure --with-ghc=$(which halvm-ghc) --with-hc-pkg=$(which halvm-ghc-pkg)

This approach might be too naive.

In regards to haddock, onus could on the user to provide the correct version.

ntc2 commented 7 years ago

I think it makes more sense to keep the halvm-* commands around, then require users to learn what they do behind the scenes. Seems much more user friendly. Also, the Halvm docs claim that these prefixed commands are the normal way that cross compilers are used: https://github.com/GaloisInc/HaLVM/wiki/What-is-the-Difference-Between-GHC-and-the-HaLVM?#the-tools.

dmjio commented 7 years ago

Didn't mean to close. Keeping halvm-cabal sounds good. Only frame of reference is cabal's ghcjs flag, but it seems like they added some code to cabal-install to support this.

cabal install --ghcjs packageName