valderman / haste-compiler

A GHC-based Haskell to JavaScript compiler
http://haste-lang.org
BSD 3-Clause "New" or "Revised" License
1.45k stars 115 forks source link

A `--prefix` option for haste-boot would be nice #386

Open WolframKahl opened 7 years ago

WolframKahl commented 7 years ago

Especially since portable is strongly discouraged for github versions, I would welcome a --prefix option for haste-boot that would set the system directory for the Haste installation. This has two main use cases for me:

  1. If things change upstream, I want to be able to test those changes while still having the old version fully available without having to fiddle with my .haste directory, or manually create private version numbers in the .cabal files.
  2. On multi-user machines, I want to be able to easily create installations that other users can use without having to somehow link into my .haste directory.

Some of this may be achievable using sandboxes, but then one first has to make sure that the cabal-install version on the GHC side is compatible with that on the Haste side (and 1.24 is not), and on the whole I find --prefix solutions much more robust than sandboxes.

WolframKahl commented 7 years ago

Possibly as an alternative, it would be helpful if haste-boot would respect

user-install: False
install-dirs global
  prefix: /usr/local/packages/MyPrefix

from my .cabal/config (which is referred to from haste-cabal, but is it actually respected there?), and if this was documented.