tweag / cooked-validators

MIT License
39 stars 11 forks source link

Rework `TxSkel` and `Constraints` #181

Closed carlhammann closed 1 year ago

carlhammann commented 1 year ago

This is a draft for now; a real solution should at least close #173, #168, #165, #164, and #129.

carlhammann commented 1 year ago

This is now ready for a first round of comments. My stopping criterion was that the direct, Contract and Staged monads compile with the new TxSkel type. The two main design goals that led to its current form are as follows:

Both of these assertions are tested with QuickCheck in Cooked.Tx.Constraints.TypeSpec, but the test of the second property has a stack overflow that I don't yet understand. If anyone can help me diagnose it, that would be much appreciated.

I would mostly like feedback on conceptual content of the module Coocked.Tx.Constraints.Type, since that's where the meat is. If you have remarks on the other changes, they're welcome as well.

carlhammann commented 1 year ago

Here are some unordered thoughts for next steps: