Skip to content

update agda2hs#2

Closed
stites wants to merge 2 commits intoviktorcsimma:mainfrom
stites:bump-agda2hs
Closed

update agda2hs#2
stites wants to merge 2 commits intoviktorcsimma:mainfrom
stites:bump-agda2hs

Conversation

@stites
Copy link
Copy Markdown

@stites stites commented Aug 14, 2025

Hi, I'm trying to compile acorn using nix and ran into some issues, so I'm starting a little PR to bump the agda2hs version to the current master.

At present, this PR uses the master branch in https://github.com/viktorcsimma/agda2hs (for the nix support) and merges in the remaining upstream PRs (agda/agda2hs#298, agda/agda2hs#299, agda/agda2hs#300, agda/agda2hs#291). These are collected in my acorn branch on my fork of agda2hs and then I am running cabal build.

The agda portion builds correctly, but agda2hs fails with:

<...>/acorn/src/Function/AlternatingSeries.agda:86,1-18
Not supported: type definition with instance arguments
callCommand: agda2hs src/All.agda (exit 42): failed
Error: cabal: Failed to build acorn-0.1.

which I'm not sure how to handle.

While this does update agda2hs it does not update agda2hs to the current master, where I am having a little trouble building agda2hs. I will fix this, but in the mean time I decided to create this draft PR in hopes that you could help me resolve the above error, @viktorcsimma.

@viktorcsimma
Copy link
Copy Markdown
Owner

Hi @stites, thanks for bringing this up! I'll take a closer look tomorrow, but as far as I remember, the main difference between my fork and the current master is the additional library files I added. So I think it should work if we somehow eliminate the other changes.

Eventually, this could be resolved as this issue in agda2hs; after that, we wouldn't need the fork at all. But until then, maybe we could move those extra library files simply into Acorn, with foreign pragmas.

But I'll take another look tomorrow if I can. Thanks again!

@viktorcsimma
Copy link
Copy Markdown
Owner

Wait, I know... the master on my repo is just an outdated version of the vanilla agda2hs. What you going to need is the have-it-both-ways branch. It is quite hidden in the readme; sorry for that 😅

Probably the best on the long run would be to abandon that other fork whatsoever, as you have mentioned. I've opened #3 for that; take a look;)

@stites
Copy link
Copy Markdown
Author

stites commented Aug 15, 2025

Yes, I noticed that the agda2hs has changed considerably. Thanks for looking into this!

I suspect you will still need something like 68b45d2 (#2) in #3, but perhaps I was just not as up-to-date as I suspected.

@stites
Copy link
Copy Markdown
Author

stites commented Aug 15, 2025

I'll close this and stick to using just the Agda portion for the time being. Looking forward to getting everything running -- very cool project!

@stites stites closed this Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants