-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proper usage of --import-dir
, or; how to use hs-to-coq
on codebases with imports
#195
Comments
I briefly considered wiggling the |
Does running Although for containers what we do is to pass to
Maybe it’s more reliable this way than hoping ghc finds the package somehow. |
Thanks. Having trouble getting
I'm working on a new project flow, I want people to be able to clone down my template and clone their project as a subdirectory of my template (or even as a git submodule) then add an edits file then run |
Laudable! :-)
Ok, then you have successfully dealt with GHC packages etc, and “just” need Coq to find the right files, juggling
That creates axioms for all the definitoins, but you still need to process the file to get the definitoins, and downstream users will import (in Coq) the module as usual. The only way I know to not depend on a module at all is to edit out all the uses of it. You can use the |
This is the precise error message re
Are you suggesting that I clone
|
That does seem like the right solution. You need a file |
Another option is to axiomatize your Bytestring library by hand. This is useful if the library is large and complicated and includes features that hs-to-coq can't handle, even in axiomatization mode. The wc example does this, and includes rename directives in the edit file to use this simplified version. While we could have axiomatized the Bytestring module, we had to do this for our model of the IO monad. |
I've been wrapping my head around the
I'm confused. If I have a |
Hello!
I have a minimal example here. the
hs-to-coq
executable was created withstack install
, but there is some nix in hereMain.hs
shell.nix
Notice that
lens
appears inhs-to-coq.cabal
.edits
And when we run we fail
Perhaps this is what
--import-dir
is for?ok,
lens
is in that directory. So if we run......well, we get the same error.
Let's add
to
edits
.Same error.
It seems to me like there's a version of
ghc
running inside the executable. Is this basically correct? If so, it would make sense that another version ofghc
wouldn't be able to make this work.It'd be great to have isolation and not have to install packages to some global
ghc
that thehs-to-coq
executable calls upon. Moreover, it'd be great to have observability into what packages are reachable by theghc
that thehs-to-coq
executable calls upon.The text was updated successfully, but these errors were encountered: