GaloisInc / cryptol

Cryptol: The Language of Cryptography
https://galoisinc.github.io/cryptol/master/RefMan.html
BSD 3-Clause "New" or "Revised" License
1.14k stars 126 forks source link

Define `tIsNominal` and use it #1733

Closed RyanGlScott closed 3 months ago

RyanGlScott commented 3 months ago

This defines a tIsNominal :: Type -> Maybe (NominalType, [Type]) function. There is one spot in Cryptol.TypeCheck.Infer where this can more neatly replace a manual pattern match on TNominal, so I went ahead and did this as well.

Fixes #1732.