agda2hs
agda2hs copied to clipboard
Interoperability between agda2hs and MAlonzo
@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 aMAlonzo
-compiled definition, there should be no restrictions - For using
MAlonzo
-compiled code inside aagda2hs
-compiled definition, the type of the definition should confirm toagda2hs
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