Skip to content

Conversation

effectfully
Copy link
Contributor

This shows how to generalize evaluateTerm so that it works with any fun.

@kwxm It's not a complete PR, let me know if you want me to make it complete or if you just want to pull these changes into your branch or if this is even the right thing / needs changes etc.

:: (NFData fun, Pretty fun, PLC.Typeable fun, Eq (BuiltinSemanticsVariant fun))
=> LedgerApi.EvaluationContext fun
-> UPLC.Term PLC.NamedDeBruijn PLC.DefaultUni fun ()
-> Benchmarkable
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the goal.


-- | The execution context for benchmarking.
evaluationContext :: Either String EvaluationContext
evaluationContext :: Either String (EvaluationContext PLC.DefaultFun)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're gonna merge this, we should probably introduce a synonym for EvaltuationContext DefaultFun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant