diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/test1.sail | 14 | ||||
| -rw-r--r-- | src/test/test3.sail | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/test/test1.sail b/src/test/test1.sail index e7828483..dfb8ac8f 100644 --- a/src/test/test1.sail +++ b/src/test/test1.sail @@ -1,14 +1,14 @@ -(*default Nat i -default Order o +default Nat 'i +default Order 'o default bool b -default forall 'a. (list 'a) b +default forall 'a. (list<'a>) b val forall 'a, 'b . (('a * 'b) -> 'b pure) snd val forall Type 'i, 'b. (('i * 'b) -> 'i pure) fst -typedef int_list [name = "il"] = list nat +typedef int_list [name = "il"] = list<nat> typedef reco = const struct forall 'i, 'a, 'b. { ('a['i]) v; 'b w; } -typedef maybe = const union forall 'a. { unit None; a Some; } +typedef maybe = const union forall 'a. { Nne; 'a Sme; } typedef colors = enumerate { red; green; blue } -typedef creg = register bits [5:i] { 5 : h ; 6..7 : j} +typedef creg = register bits [5:'i] { 5 : h ; 6..7 : j} let bool e = true -function unit main _ = ()*) +function unit main _ = ()
\ No newline at end of file diff --git a/src/test/test3.sail b/src/test/test3.sail index 4a216467..30513bc9 100644 --- a/src/test/test3.sail +++ b/src/test/test3.sail @@ -8,9 +8,9 @@ val ( ( nat * nat ) -> nat effect { wmem , rmem } ) MEM_SIZE (* extern functions *) val extern ( ( nat * nat ) -> nat pure ) add = "add" -val extern ( ( nat * nat ) -> nat pure ) (: + ) = "add_infix" (* infix plus *) +val extern ( ( nat * nat ) -> nat pure ) (deinfix + ) = "add_infix" (* infix plus *) -function nat (: * ) ( < nat > x, < nat > y ) = 42 +function nat (deinfix * ) ( (nat) x, (nat) y ) = 42 function nat main _ = { (* left-hand side function call = memory write *) |
