agda2hs icon indicating copy to clipboard operation
agda2hs copied to clipboard

Interoperability between agda2hs and MAlonzo

Open jespercockx opened this issue 1 year ago • 0 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. https://github.com/input-output-hk/formal-ledger-specifications/issues/320

jespercockx avatar Dec 07 '23 16:12 jespercockx