-
Notifications
You must be signed in to change notification settings - Fork 23
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
Generate Haskell code from the Agda spec #1315
base: main
Are you sure you want to change the base?
Conversation
Perhaps at this point, before I move forward with other STS's, there is a good opportunity to properly integrate this work into the current Cabal project. @amesgen: What's your opinion? Is this perhaps something you can do? (no pressure 🙂). |
I have tried
I am using agda-stdlib 2.0. What am I doing wrong? |
Will have a look 👍
I am not sure exactly, but maybe you need to setup agda-stdlib-classes and agda-stdlib-meta? ouroboros-consensus/nix/agda.nix Lines 19 to 49 in f196bfc
|
@amesgen thanks for your answer 🙏 So I have those setup, they are in my |
It seems I had outdated version of agda-stdlib-classes and agda-stdlib-meta. Refreshing to match the revisions given in nix file does yield to different errors. |
It should work with nix develop .#agda-spec We definitely want a good readme for |
It's funny that |
Just to explain this behavior: These two commands use the Nix registry which is completely independent of the local project you are working on. Therefore, In contrast, Line 81 in 68b9799
|
I still wish I could |
43c9f54
to
f3361a3
Compare
Signed-off-by: Javier Díaz <[email protected]>
f3361a3
to
a98ba32
Compare
Fixes #1343 Note that this PR targets the branch of #1315 and not `main`. This PR adds Nix derivations that: - generate Haskell code from the Agda spec using the `Makefile`-based build system in `./docs/agda-spec/` - wrap the generated code into Nix using `cabal2nix` In combination with the existing set-up in `flake.nix`, we can now build the generated code and run it's tests using the following flake output: ``` nix build .#hydraJobs.x86_64-linux.native.agda-spec.hsExe ``` which will also be done in CI, i.e. see the logs from testing this PR - the job [x86_64-linux.native.agda-spec.hsExe](https://ci.iog.io/build/6263029/log) builds and runs tests for the generated code some other jobs, e.g. the linting of the unit tests for the generated code, are failing, but we can fix those in #1315
…pec-to-haskell' into javierdiaz72/agda-spec-to-haskell
b307ad4
to
5987184
Compare
- dos2unix - hlint - make `cardano-consensus-executable-spec.cabal` pass `cabal.check` Make `cardano-consensus-executable-spec.cabal` pass `cabal.check` Copy licence files instead of linking fix cabal file
5987184
to
f2af22c
Compare
This PR resolves #1312 and #1343.