Add programs to trigger error cases.

This commit is contained in:
Danila Fedorin 2020-09-10 14:02:19 -07:00
parent 1a05d5ff7a
commit ca395b5c09
15 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,6 @@
defn main = {
case True of {
n -> { 2 }
n -> { 1 }
}
}

View File

@ -0,0 +1 @@
data Pair a a = { MkPair a a }

View File

@ -0,0 +1,7 @@
defn main = {
case True of {
True -> { 1 }
False -> { 0 }
n -> { 2 }
}
}

View File

@ -0,0 +1,5 @@
defn main = {
case True of {
True -> { 1 }
}
}

View File

@ -0,0 +1,7 @@
defn add x y = { x + y }
defn main = {
case add of {
n -> { 1 }
}
}

View File

@ -0,0 +1,7 @@
defn main = {
case True of {
n -> { 2 }
True -> { 1 }
False -> { 0 }
}
}

View File

@ -0,0 +1,8 @@
data List = { Nil, Cons Int List }
defn head l = {
case l of {
Nil -> { 0 }
Cons x -> { x }
}
}

View File

@ -0,0 +1,8 @@
data List = { Nil, Cons Int List }
defn head l = {
case l of {
Nil -> { 0 }
Cons x y z -> { x }
}
}

View File

@ -0,0 +1,6 @@
defn main = {
case True of {
NotBool -> { 1 }
True -> { 2 }
}
}

View File

@ -0,0 +1 @@
data Bool = { True, False }

View File

@ -0,0 +1,3 @@
defn main = {
weird 1
}

View File

@ -0,0 +1 @@
data Wrapper = { Wrap Weird }

View File

@ -0,0 +1 @@
data Wrapper = { Wrap a }

View File

@ -0,0 +1,3 @@
defn main = {
Weird 1
}

View File

@ -0,0 +1 @@
data Wrapper = { Wrap (Int Bool) }