mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-16 20:03:27 +03:00
Change constraint synonym syntax from "constraint" to "type constraint".
For example: type constraint NonZero n = (fin n, 1 <= n) last : {n, a} NonZero n => [n]a -> a last xs = xs!0
This commit is contained in:
parent
393a11e170
commit
2ce1ca3eca
@ -298,10 +298,10 @@ decl :: { Decl PName }
|
||||
| 'type' name tysyn_params '=' type
|
||||
{% at ($1,$5) `fmap` mkTySyn $2 (reverse $3) $5 }
|
||||
|
||||
| 'constraint' name '=' type
|
||||
{% at ($1,$4) `fmap` mkPropSyn $2 [] $4 }
|
||||
| 'constraint' name tysyn_params '=' type
|
||||
{% at ($1,$5) `fmap` mkPropSyn $2 (reverse $3) $5 }
|
||||
| 'type' 'constraint' name '=' type
|
||||
{% at ($2,$5) `fmap` mkPropSyn $3 [] $5 }
|
||||
| 'type' 'constraint' name tysyn_params '=' type
|
||||
{% at ($2,$6) `fmap` mkPropSyn $3 (reverse $4) $6 }
|
||||
|
||||
| 'infixl' NUM ops {% mkFixity LeftAssoc $2 (reverse $3) }
|
||||
| 'infixr' NUM ops {% mkFixity RightAssoc $2 (reverse $3) }
|
||||
|
Loading…
Reference in New Issue
Block a user