summaryrefslogtreecommitdiff
path: root/src/initial_check.mli
diff options
context:
space:
mode:
authorAlasdair Armstrong2017-07-21 17:31:08 +0100
committerAlasdair Armstrong2017-07-21 17:31:08 +0100
commit79b81722d8cfe3c2c2fa16bbc8643e8243dfa015 (patch)
tree8505834a54e449aae18307ec5647472a4155cf72 /src/initial_check.mli
parentb7b6ebc7da062141369d85cd263f1b07561cd396 (diff)
Add a prove builtin that allows testing flow typing
For example: default Order dec val bit[64] -> unit effect pure test64 val cast forall 'n, 'n = 32 | 'n = 64. bit['n] -> unit effect pure test function forall 'n. unit test addr = { _prove(constraint('n != 16)); assert(constraint('n = 64), "64-bit mode"); _prove(constraint('n = 64)); test64(addr); } This doesn't affect the AST at all as _prove is just a ordinary function that the typechecker treats specially.
Diffstat (limited to 'src/initial_check.mli')
0 files changed, 0 insertions, 0 deletions