Closed Lysxia closed 4 years ago
Thanks! This looks good.
Unfortunately, examples/ghc
does not seem to be working with hs-to-coq of later GHC versions. We still need this example, but maybe this shouldn't keep us from compiling hs-to-coq with later versions of GHC? Maybe we can merge this version and document this in README.
Another issue is examples/ghc
depends on this version of base
. Updating base
would also impact examples/ghc
. Maybe to keep examples like ghc
work and support later versions of Haskell base library we would need to have separate versions of translated base
and separate base/edits
.
An alternative may be using Git branches to keep different versions of base
in different branches. Not sure if this would be a good idea though...
Oh that is a bummer.
Maybe there is a way to fix the build, for example if it's a sufficiently small patch? I made a little more progress to translate examples/base-src
with this new version of hs-to-coq by enabling -XNoStarIsType
but after that I'm stuck on a real GHC panic for now.
That said, one would most likely want to use a translation of the same base
version as the one hs-to-coq
was compiled with. So for this support for multiple versions of GHC to be useful, we have to figure out how to maintain multiple Coqified versions of base anyway.
The ideal setup I can imagine is to only maintain edits
files and a few handwritten .v
files to handle whatever hardwiring GHC does. We would only need to track a small enough number of files in git, so it can all be done in a single branch for all supported versions of GHC, base
, etc.. From that we would generate the translated base
automatically on the fly for any chosen version. (The main concern for that checking that into the repo would be too much bloat.) How feasible does that sound?
For releases we can have a separate repo with the Coqified base + theories, updated periodically for Opam packaging.
This also makes sure to still work with 8.4
I think this PR is already in a mergeable state on its own, but here are some TODOs for the near future:
Maybe
,GHC.Base.Maybe
->GHC.Maybe.Maybe
); this needs to be reflected in thebase/edits
file, and some new modules might need to be added to the Coq-ified base library.I'm not sure whether we should maintain different edits for each GHC version, or have a single file compatible with everything, since the changes are presumably quite minor.
intervals
andgraph
)