-
Notifications
You must be signed in to change notification settings - Fork 26
Generate Haskell code from the Agda spec #1315
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
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 |
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
5987184
to
f2af22c
Compare
Hi @javierdiaz72, Happy New Year! Shall we merge this PR so that it does not bit-rot? |
Hi, @geo2a! Happy New Year to you too! There is still quite a bit of work to do regarding this PR (that's why it's still in draft mode), so we should not merge it yet. |
Hi, @geo2a! Do you have an idea why some of the CI checks are still failing? |
CI is complaining about the fact that some files don't have LF (unix style) line endings: https://ci.iog.io/build/6541916/nixlog/1 (also see #1253/#1252). |
Thanks for pointing that out, Alex! I've just fixed the issue with the file and now the CI is not complaining anymore. 🙂 |
Hey, folks! I'm not sure why the last CI check is failing. Could anybody help me out? |
b8c7b99
to
55d59a4
Compare
Some issues I encountered when trying to build this outside of Nix:
|
Addressed in 88bdc09, please check. |
Signed-off-by: Javier Díaz <[email protected]>
- 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
88bdc09
to
5b1203d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @javierdiaz72 for addressing the comments! I've rebased and signed your commits with my signature, as the repository settings require signing the commits. Your authorship seems to be retained and correctly displayed, but please let me know if you'd like to re-sign your commits with your own signature.
This PR resolves #1312 and #1343.