diff options
Diffstat (limited to 'test/ocaml/pattern1/pattern.sail')
| -rw-r--r-- | test/ocaml/pattern1/pattern.sail | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/ocaml/pattern1/pattern.sail b/test/ocaml/pattern1/pattern.sail index a2314adc..3c28d46e 100644 --- a/test/ocaml/pattern1/pattern.sail +++ b/test/ocaml/pattern1/pattern.sail @@ -1,11 +1,9 @@ - -val unit -> unit effect pure main +val main : unit -> unit function main () = { - vec := 0x4F; - switch vec { - case (0b01 : (bit[2]) x : 0xF) -> - if (x == 0b00) then print("pass") else print("x is incorrect") - case _ -> print("pattern fail") + vec = 0x4F; + match vec { + 0b01 @ x : bits(2) @ 0xF => if x == 0b00 then print("pass") else print("x is incorrect"), + _ => print("pattern fail") } } |
