Add programs to trigger error cases.
This commit is contained in:
parent
2ede230704
commit
0e816e523a
|
@ -0,0 +1,6 @@
|
|||
defn main = {
|
||||
case True of {
|
||||
n -> { 2 }
|
||||
n -> { 1 }
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
data Pair a a = { MkPair a a }
|
|
@ -0,0 +1,7 @@
|
|||
defn main = {
|
||||
case True of {
|
||||
True -> { 1 }
|
||||
False -> { 0 }
|
||||
n -> { 2 }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
defn main = {
|
||||
case True of {
|
||||
True -> { 1 }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
defn add x y = { x + y }
|
||||
|
||||
defn main = {
|
||||
case add of {
|
||||
n -> { 1 }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
defn main = {
|
||||
case True of {
|
||||
n -> { 2 }
|
||||
True -> { 1 }
|
||||
False -> { 0 }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
data List = { Nil, Cons Int List }
|
||||
|
||||
defn head l = {
|
||||
case l of {
|
||||
Nil -> { 0 }
|
||||
Cons x -> { x }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
data List = { Nil, Cons Int List }
|
||||
|
||||
defn head l = {
|
||||
case l of {
|
||||
Nil -> { 0 }
|
||||
Cons x y z -> { x }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
defn main = {
|
||||
case True of {
|
||||
NotBool -> { 1 }
|
||||
True -> { 2 }
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
data Bool = { True, False }
|
|
@ -0,0 +1,3 @@
|
|||
defn main = {
|
||||
weird 1
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
data Wrapper = { Wrap Weird }
|
|
@ -0,0 +1 @@
|
|||
data Wrapper = { Wrap a }
|
|
@ -0,0 +1,3 @@
|
|||
defn main = {
|
||||
Weird 1
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
data Wrapper = { Wrap (Int Bool) }
|
Loading…
Reference in New Issue