2021-02-28 05:00:20 +03:00
|
|
|
1/1: Building TypeCase (TypeCase.idr)
|
|
|
|
Main> "Nat"
|
2020-05-19 20:25:18 +03:00
|
|
|
"List of Nat"
|
|
|
|
"List of Something else"
|
|
|
|
"List of Something else"
|
|
|
|
"List of Bool"
|
|
|
|
"Int"
|
|
|
|
"Something else"
|
|
|
|
"List of Type"
|
|
|
|
"List of Int"
|
|
|
|
43
|
|
|
|
42
|
2021-02-28 05:00:20 +03:00
|
|
|
Main> Main.strangeId is total
|
2020-08-12 01:27:52 +03:00
|
|
|
Main> Main.strangeId': strangeId' _
|
2020-05-19 20:25:18 +03:00
|
|
|
Main> Bye for now!
|
|
|
|
1/1: Building TypeCase2 (TypeCase2.idr)
|
2020-07-28 15:11:42 +03:00
|
|
|
Error: While processing left hand side of strangeId. Can't match on Nat (Erased argument).
|
|
|
|
|
2021-06-05 14:53:22 +03:00
|
|
|
TypeCase2:5:14--5:17
|
2021-02-11 20:24:26 +03:00
|
|
|
1 | data Bar = MkBar
|
|
|
|
2 | data Baz = MkBaz
|
|
|
|
3 |
|
|
|
|
4 | strangeId : a -> a
|
2020-07-22 22:16:43 +03:00
|
|
|
5 | strangeId {a=Nat} x = x+1
|
2021-02-11 20:24:26 +03:00
|
|
|
^^^
|
2020-07-28 15:11:42 +03:00
|
|
|
|
|
|
|
Error: While processing left hand side of foo. Can't match on Nat (Erased argument).
|
|
|
|
|
2021-06-05 14:53:22 +03:00
|
|
|
TypeCase2:9:5--9:8
|
2021-02-11 20:24:26 +03:00
|
|
|
5 | strangeId {a=Nat} x = x+1
|
|
|
|
6 | strangeId x = x
|
|
|
|
7 |
|
|
|
|
8 | foo : (0 x : Type) -> String
|
2020-07-22 22:16:43 +03:00
|
|
|
9 | foo Nat = "Nat"
|
2021-02-11 20:24:26 +03:00
|
|
|
^^^
|
2020-07-28 15:11:42 +03:00
|
|
|
|