agda / agda2hs

Compiling Agda code to readable Haskell

Home Page:https://agda.github.io/agda2hs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Interoperability between agda2hs and MAlonzo

jespercockx opened this issue · comments

@omelkonian mentions it would be useful to be able to use agda2hs and MAlonzo together in a single project, letting the programmer choose on a per-declaration basis with which backend to compile. This would allow generating readable Haskell code for the functions that fall within the fragment of agda2hs, while still allowing use of arbitrary Agda functions (which then get an ugly definition).

  • For using agda2hs-compiled code inside a MAlonzo-compiled definition, there should be no restrictions
  • For using MAlonzo-compiled code inside a agda2hs-compiled definition, the type of the definition should confirm to agda2hs standards (but not its body).

How exactly this would work is still a bit vague to me, but it could potentially open up new use cases for agda2hs, see e.g. IntersectMBO/formal-ledger-specifications#320