diff options
Diffstat (limited to 'test/typecheck')
| -rw-r--r-- | test/typecheck/pass/option_either.sail | 6 | ||||
| -rw-r--r-- | test/typecheck/pass/pat_completeness.sail | 8 | ||||
| -rw-r--r-- | test/typecheck/pass/union_infer.sail | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/test/typecheck/pass/option_either.sail b/test/typecheck/pass/option_either.sail index 632b882d..de4458ed 100644 --- a/test/typecheck/pass/option_either.sail +++ b/test/typecheck/pass/option_either.sail @@ -1,13 +1,13 @@ default Order inc -union option ('a : Type) = {None, Some : 'a} +union option ('a : Type) = {None : unit, Some : 'a} -function none () -> forall ('a : Type). option('a) = None +function none () -> forall ('a : Type). option('a) = None() function some x : 'a -> forall ('a : Type). option('a) = Some(x) function test x : option('a) -> forall ('a : Type). range(0, 1) = match x { - None => 0, + None() => 0, Some(y) => 1 } diff --git a/test/typecheck/pass/pat_completeness.sail b/test/typecheck/pass/pat_completeness.sail index fd4a7757..6a4036c5 100644 --- a/test/typecheck/pass/pat_completeness.sail +++ b/test/typecheck/pass/pat_completeness.sail @@ -1,11 +1,11 @@ -union option ('a : Type) = {None, Some : 'a} +union option ('a : Type) = {None : unit, Some : 'a} union ast = {Foo : unit} -let x : option(ast) = Some(Foo) +let x : option(ast) = Some(Foo()) let y : unit = match(x) { - Some(Foo) => (), + Some(Foo()) => (), Some(a) => (), - None => () + None() => () }
\ No newline at end of file diff --git a/test/typecheck/pass/union_infer.sail b/test/typecheck/pass/union_infer.sail index 15eb5c60..bb422b65 100644 --- a/test/typecheck/pass/union_infer.sail +++ b/test/typecheck/pass/union_infer.sail @@ -1,7 +1,7 @@ default Order inc -union option ('a : Type) = {None, Some : 'a} +union option ('a : Type) = {None : unit, Some : 'a} -union Test = {A, B, C} +union Test = {A : unit, B : unit, C : unit} -function test () -> option(Test) = Some(C) +function test () -> option(Test) = Some(C()) |
