diff options
| author | Brian Campbell | 2019-04-02 14:55:26 +0100 |
|---|---|---|
| committer | Brian Campbell | 2019-04-02 14:55:37 +0100 |
| commit | 247b9fcf1c0a4cec4a8c4e6e28aacd8b7ae72513 (patch) | |
| tree | ba0e43dcdab15acdf9a54cbe97ec60dfbc91a4d3 /test | |
| parent | d9d0a6d064a26f19b4daa5b7a267b0b89926f338 (diff) | |
Coq: replace n_constraints with equivalent bool variables
Prevents some type variables that came from unpacking existentials
leaking into generated Coq types.
Diffstat (limited to 'test')
| -rw-r--r-- | test/coq/pass/unbound_ex_tyvars.sail | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/coq/pass/unbound_ex_tyvars.sail b/test/coq/pass/unbound_ex_tyvars.sail new file mode 100644 index 00000000..f99b1bd1 --- /dev/null +++ b/test/coq/pass/unbound_ex_tyvars.sail @@ -0,0 +1,16 @@ +$include <prelude.sail> + +/* We currently produce a rich type for the guard of the if that's + visible in the Coq output. The raw Sail type involves unbound type + variables that were existentially bound in x, so in order to print + out a useful Coq type we now rewrite it in terms of x. */ + +val isA : unit -> bool effect {rreg} +val isB : unit -> bool effect {rreg} +val isC : unit -> bool effect {rreg} +val foo : bool -> bool effect {rreg} + +function foo(b) = { + let x = (b | isA()) & isB(); + if x | isC() then true else false +} |
