defStubs in c2uplc/src/Covenant/CodeGen/Stubs.hs sets up proj/embed for Integer, ByteString, Bool, String, Unit, G1, and G2. MlResult is missing. There's already a comment at line 856 acknowledging it:
-- Ml_Result - Has no data encoding NOTE: Need to error here
trySelectHandler (line 592) has no case for BLS12_381_MlResultT either falls through to the wildcard and returns Nothing silently.
Also missing from primTypes in FirstPass.hs:65:
primTypes = [intT, boolT, stringT, byteStringT, unitT, blsG1T, blsG2T]
-- no blsMlResultT
If there's no sensible Data encoding for MlResult, at least trySelectHandler should throw a clear error instead of returning Nothing and leaving people guessing.
The raw builtins (millerLoop, mulMlResult, finalVerify) work fine it's just that MlResult values can't go through Data.
defStubsinc2uplc/src/Covenant/CodeGen/Stubs.hssets up proj/embed for Integer, ByteString, Bool, String, Unit, G1, and G2. MlResult is missing. There's already a comment at line 856 acknowledging it:-- Ml_Result - Has no data encoding NOTE: Need to error heretrySelectHandler(line 592) has no case forBLS12_381_MlResultTeither falls through to the wildcard and returnsNothingsilently.Also missing from
primTypesinFirstPass.hs:65:If there's no sensible Data encoding for MlResult, at least
trySelectHandlershould throw a clear error instead of returningNothingand leaving people guessing.The raw builtins (
millerLoop,mulMlResult,finalVerify) work fine it's just that MlResult values can't go through Data.