From a740278c7d7aa64e3fade12301108f0e91cd8ee9 Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Tue, 3 Dec 2013 17:45:53 +0000 Subject: Syntax changes per discussion with Peter, as well as L2.ott document clean up. Could not at this time return lists to [| |] from [|| ||] as the parser cannot distinguish a cast with enum’s syntactic sugar from the start of a parenthesised list (i.e. ( [|3|] ) And there are still conflicts with moving enums to [3], so those changes can’t be pushed in with current parser technology. --- src/test/test1.sail | 4 ++-- src/test/test3.sail | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test') diff --git a/src/test/test1.sail b/src/test/test1.sail index 128a4a99..5c29f258 100644 --- a/src/test/test1.sail +++ b/src/test/test1.sail @@ -2,8 +2,8 @@ default Nat 'i default Order 'o default bool 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 +val forall 'a, 'b . ('a * 'b) -> 'b effect pure snd +val forall Type 'i, 'b. ('i * 'b) -> 'i effect pure fst typedef int_list [name = "il"] = list typedef reco = const struct forall 'i, 'a, 'b. { 'a['i] v; 'b w; } typedef maybe = const union forall 'a. { Nne; 'a Sme; } diff --git a/src/test/test3.sail b/src/test/test3.sail index e77e1b71..89c710bc 100644 --- a/src/test/test3.sail +++ b/src/test/test3.sail @@ -7,8 +7,8 @@ val nat -> nat effect { wmem , rmem } MEM_GPU 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 (deinfix + ) = "add_infix" (* infix plus *) +val extern ( nat * nat ) -> nat effect pure add = "add" +val extern ( nat * nat ) -> nat effect pure (deinfix + ) = "add_infix" (* infix plus *) function nat (deinfix * ) ( (nat) x, (nat) y ) = 42 -- cgit v1.2.3