plclub / hs-to-coq

Convert Haskell source code to Coq source code.
https://hs-to-coq.readthedocs.io
MIT License
77 stars 8 forks source link

GHC flags taken into account too late #152

Open lastland opened 3 years ago

lastland commented 3 years ago

Issue by nomeata Thursday Mar 26, 2020 at 17:22 GMT Originally opened as https://github.com/antalsz/hs-to-coq/issues/152


It seems that

hs-to-coq --ghc -package-env=hs-to-coq.env

doesn’t work the way it should, but

GHC_ENVIRONMENT=hs-to-coq.env hs-to-coq

does.

Some wild guess: We need to extract the --ghc flags and pass them to the GHC API earlier, maybe in lib/HsToCoq/Util/GHC.hs.

(Not working on that right now, the work-around is fine for now.)

quinn-dougherty commented 3 years ago

-package-envs isn't present in the current hs-to-coq --help menu.

nomeata commented 3 years ago

It's a GHC flag, hs-to-coq just passes it through (when prefixed with --ghc)