mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-20 12:42:12 +03:00
fbbbb8f56f
Numeric constraint guards have very particular syntactic requirements: * They must always be used in top-level definitions. * Their definitions must always be accompanied by a top-level type signature. Previously, we checked these requirements in a combination of places in the parser and the typechecker. The checks in the typechecker weren't very thorough, however, and they failed to catch local definitions without type signatures that use constraint guards, as seen in #1685. This patch moves all of these syntactic checks to the parser (in `Cryptol.Parser.ExpandPropGuards`). We now recurse into expressions to check for local definition that use constraint guards and error if we encounter one. This ensures that by the time we reach the typechecker, all constraint guard expressions are at least syntactically valid. Fixes #1685. |
||
---|---|---|
.. | ||
constant.cry | ||
constant.icry | ||
constant.icry.stdout | ||
inits.cry | ||
inits.icry | ||
inits.icry.stdout | ||
insert.cry | ||
insert.icry | ||
insert.icry.stdout | ||
len.cry | ||
len.icry | ||
len.icry.stdout | ||
mergesort.cry | ||
mergesort.icry | ||
mergesort.icry.stdout | ||
nestFun.cry | ||
nestFun.icry | ||
nestFun.icry.stdout | ||
nestMod.cry | ||
nestMod.icry | ||
nestMod.icry.stdout | ||
noNested.cry | ||
noNested.icry | ||
noNested.icry.stdout | ||
noPrim.cry | ||
noPrim.icry | ||
noPrim.icry.stdout | ||
noTypeSig.cry | ||
noTypeSig.icry | ||
noTypeSig.icry.stdout | ||
noTypeSigNested.cry | ||
noTypeSigNested.icry | ||
noTypeSigNested.icry.stdout | ||
tail.cry | ||
tail.icry | ||
tail.icry.stdout | ||
type-sig-constraint.cry | ||
type-sig-constraint.icry | ||
type-sig-constraint.icry.stdout |