|
| 1 | +set_option trace.compiler.ir.result true |
| 2 | + |
| 3 | +/-- |
| 4 | +trace: [Compiler.IR] [result] |
| 5 | + def _example (x_1 : u8) (x_2 : u8) : u8 := |
| 6 | + case x_1 : u8 of |
| 7 | + Bool.false → |
| 8 | + case x_2 : u8 of |
| 9 | + Bool.false → |
| 10 | + let x_3 : u8 := 1; |
| 11 | + ret x_3 |
| 12 | + Bool.true → |
| 13 | + ret x_1 |
| 14 | + Bool.true → |
| 15 | + ret x_2 |
| 16 | + def _example._boxed (x_1 : tagged) (x_2 : tagged) : tagged := |
| 17 | + let x_3 : u8 := unbox x_1; |
| 18 | + let x_4 : u8 := unbox x_2; |
| 19 | + let x_5 : u8 := _example x_3 x_4; |
| 20 | + let x_6 : tobj := box x_5; |
| 21 | + ret x_6 |
| 22 | +-/ |
| 23 | +#guard_msgs in |
| 24 | +example (a b : Bool) : Bool := decide (a ↔ b) |
| 25 | + |
| 26 | +/-- |
| 27 | +trace: [Compiler.IR] [result] |
| 28 | + def _example (x_1 : u8) (x_2 : u8) : u8 := |
| 29 | + case x_1 : u8 of |
| 30 | + Bool.false → |
| 31 | + let x_3 : u8 := 1; |
| 32 | + ret x_3 |
| 33 | + Bool.true → |
| 34 | + ret x_2 |
| 35 | + def _example._boxed (x_1 : tagged) (x_2 : tagged) : tagged := |
| 36 | + let x_3 : u8 := unbox x_1; |
| 37 | + let x_4 : u8 := unbox x_2; |
| 38 | + let x_5 : u8 := _example x_3 x_4; |
| 39 | + let x_6 : tobj := box x_5; |
| 40 | + ret x_6 |
| 41 | +-/ |
| 42 | +#guard_msgs in |
| 43 | +example (a b : Bool) : Bool := decide (a → b) |
| 44 | + |
| 45 | +/-- |
| 46 | +trace: [Compiler.IR] [result] |
| 47 | + def _example (x_1 : u8) (x_2 : u8) : u8 := |
| 48 | + case x_1 : u8 of |
| 49 | + Bool.false → |
| 50 | + ret x_1 |
| 51 | + Bool.true → |
| 52 | + ret x_2 |
| 53 | + def _example._boxed (x_1 : tagged) (x_2 : tagged) : tagged := |
| 54 | + let x_3 : u8 := unbox x_1; |
| 55 | + let x_4 : u8 := unbox x_2; |
| 56 | + let x_5 : u8 := _example x_3 x_4; |
| 57 | + let x_6 : tobj := box x_5; |
| 58 | + ret x_6 |
| 59 | +-/ |
| 60 | +#guard_msgs in |
| 61 | +example (a b : Bool) : Bool := decide (∃ _ : a, b) |
| 62 | + |
| 63 | +/-- |
| 64 | +trace: [Compiler.IR] [result] |
| 65 | + def _example (x_1 : u8) : u8 := |
| 66 | + ret x_1 |
| 67 | + def _example._boxed (x_1 : tagged) : tagged := |
| 68 | + let x_2 : u8 := unbox x_1; |
| 69 | + let x_3 : u8 := _example x_2; |
| 70 | + let x_4 : tobj := box x_3; |
| 71 | + ret x_4 |
| 72 | +-/ |
| 73 | +#guard_msgs in |
| 74 | +example (a : Bool) : Bool := decide (if _h : a then True else False) |
0 commit comments