-
Notifications
You must be signed in to change notification settings - Fork 847
Open
Description
ConfigMonoid (and probably other config monoids too) contains a few fields that have more permissive types than necessary. This has the effect that bad inputs go undetected or result in errors that are reported out of context or only after the inputs have been passed to ghc.
A few of the problematic fields:
configMonoidWorkDirconfigMonoidOsconfigMonoidExtraIncludeDirs
Example interaction:
$ stack --extra-lib-dirs --oops build
these-0.7: unregistering (local file changes: Control/Monad/Chronicle.hs Control/Monad/Chronicle/Class.hs Control/Monad/Trans/Chronicle.hs Data...)
these-0.7: configure
Configuring these-0.7...
Warning: 'extra-lib-dirs: --oops' directory does not exist.
...
Compare this to the error message for an argument that must be a Path Abs Dir:
$ stack --stack-root --oops path
option --stack-root: Failed to parse absolute path to directory: '--oops'
Usage: stack [--help] [--version] [--numeric-version] [--hpack-numeric-version]
...