diff options
Diffstat (limited to 'testdata/language-features/adt/adt05.out')
-rw-r--r-- | testdata/language-features/adt/adt05.out | 145 |
1 files changed, 142 insertions, 3 deletions
diff --git a/testdata/language-features/adt/adt05.out b/testdata/language-features/adt/adt05.out index 2f1af5ee..c44d22b9 100644 --- a/testdata/language-features/adt/adt05.out +++ b/testdata/language-features/adt/adt05.out | |||
@@ -1,3 +1,142 @@ | |||
1 | testdata/language-features/adt/adt05.lc:14:1: | 1 | main :: @Type -> forall a . Num a => Bool |
2 | main = isEmpty value1 && isCons value2 | 2 | main = main |
3 | ^^^^ \ No newline at end of file | 3 | ------------ desugared source code |
4 | data TList (_ :: Type) :: Type where | ||
5 | TEmpty :: forall a . TList a | ||
6 | TCons :: forall b . b -> TList b -> TList b | ||
7 | |||
8 | value1 = _lhs value1 (_rhs TEmpty) | ||
9 | |||
10 | value2 = _lhs value2 (_rhs (TCons (fromInt 3) value1)) | ||
11 | |||
12 | isEmpty | ||
13 | = _lhs | ||
14 | isEmpty | ||
15 | \(a :: _) -> case'TList | ||
16 | (\(_ :: _) -> _) | ||
17 | (_rhs True) | ||
18 | (\(_ :: _) (_ :: _) -> _rhs False) | ||
19 | a | ||
20 | |||
21 | isCons | ||
22 | = _lhs | ||
23 | isCons | ||
24 | \(a :: _) -> case'TList | ||
25 | (\(_ :: _) -> _) | ||
26 | (_rhs False) | ||
27 | (\(_ :: _) (_ :: _) -> _rhs True) | ||
28 | a | ||
29 | |||
30 | main = _lhs main (_rhs (isEmpty value1 && isCons value2)) | ||
31 | ------------ core code | ||
32 | 'TList :: Type -> Type | ||
33 | 'TList = <<type constructor with 0 indices; constructors: TEmpty, TCons>> | ||
34 | |||
35 | TCons :: forall a . a -> TList a -> TList a | ||
36 | TCons = <<1st constructor of 'TList>> | ||
37 | |||
38 | TEmpty :: forall a . TList a | ||
39 | TEmpty = <<0th constructor of 'TList>> | ||
40 | |||
41 | case'TList | ||
42 | :: forall a | ||
43 | . forall (b :: TList a -> Type) | ||
44 | -> b 'TEmpty | ||
45 | -> (forall (c :: a) (d :: TList a) -> b ('TCons c d)) | ||
46 | -> forall (e :: TList a) -> b e | ||
47 | case'TList = \_ a b c d -> <<case function of a type with 1 parameters>> | ||
48 | |||
49 | isCons :: forall a . TList a -> Bool | ||
50 | isCons = \_ a -> case'TList (\_ -> 'Bool) (_rhs False) (\_ _ -> _rhs True) a | ||
51 | |||
52 | isEmpty :: forall a . TList a -> Bool | ||
53 | isEmpty = \_ a -> case'TList (\_ -> 'Bool) (_rhs True) (\_ _ -> _rhs False) a | ||
54 | |||
55 | main :: @Type -> forall a . Num a => Bool | ||
56 | main = \_ _ _ -> _rhs True | ||
57 | |||
58 | match'TList | ||
59 | :: forall (a :: Type -> Type) | ||
60 | -> (forall b -> a (TList b)) -> forall c -> a c -> a c | ||
61 | match'TList = \a b c d -> <<type case function>> | ||
62 | |||
63 | value1 :: forall a . TList a | ||
64 | value1 = _rhs TEmpty | ||
65 | |||
66 | value2 :: forall a . Num a => TList a | ||
67 | value2 = \a b -> _rhs (TCons (fromInt a b 3) TEmpty) | ||
68 | ------------ tooltips | ||
69 | testdata/language-features/adt/adt05.lc 3:6-3:11 | ||
70 | Type -> Type | Type -> Type | Type -> Type | Type -> Type | Type -> Type | Type | ||
71 | testdata/language-features/adt/adt05.lc 3:6-3:13 | ||
72 | Type | Type | Type | Type | ||
73 | testdata/language-features/adt/adt05.lc 3:6-3:30 | ||
74 | Type | Type | Type | ||
75 | testdata/language-features/adt/adt05.lc 3:6-3:42 | ||
76 | Type | Type | ||
77 | testdata/language-features/adt/adt05.lc 3:12-3:13 | ||
78 | Type | Type | ||
79 | testdata/language-features/adt/adt05.lc 3:16-3:22 | ||
80 | forall a . TList a | TList _b | ||
81 | testdata/language-features/adt/adt05.lc 3:25-3:30 | ||
82 | forall a . a -> TList a -> TList a | TList _e | Type | Type | Type | ||
83 | testdata/language-features/adt/adt05.lc 3:31-3:32 | ||
84 | Type | ||
85 | testdata/language-features/adt/adt05.lc 3:34-3:39 | ||
86 | Type -> Type | ||
87 | testdata/language-features/adt/adt05.lc 3:34-3:41 | ||
88 | Type | ||
89 | testdata/language-features/adt/adt05.lc 3:40-3:41 | ||
90 | Type | ||
91 | testdata/language-features/adt/adt05.lc 5:1-5:7 | ||
92 | forall a . TList a | ||
93 | testdata/language-features/adt/adt05.lc 5:10-5:16 | ||
94 | forall a . TList a | ||
95 | testdata/language-features/adt/adt05.lc 6:1-6:7 | ||
96 | forall a . Num a => TList a | ||
97 | testdata/language-features/adt/adt05.lc 6:10-6:15 | ||
98 | forall a . a -> TList a -> TList a | ||
99 | testdata/language-features/adt/adt05.lc 6:10-6:17 | ||
100 | TList _b -> TList _b | ||
101 | testdata/language-features/adt/adt05.lc 6:10-6:24 | ||
102 | TList _b | ||
103 | testdata/language-features/adt/adt05.lc 6:16-6:17 | ||
104 | _b | ||
105 | testdata/language-features/adt/adt05.lc 6:18-6:24 | ||
106 | forall a . TList a | ||
107 | testdata/language-features/adt/adt05.lc 8:1-8:8 | ||
108 | forall a . TList a -> Bool | ||
109 | testdata/language-features/adt/adt05.lc 8:18-8:22 | ||
110 | Bool | ||
111 | testdata/language-features/adt/adt05.lc 8:18-9:23 | ||
112 | TList _a -> Bool | ||
113 | testdata/language-features/adt/adt05.lc 9:18-9:23 | ||
114 | Bool | ||
115 | testdata/language-features/adt/adt05.lc 11:1-11:7 | ||
116 | forall a . TList a -> Bool | ||
117 | testdata/language-features/adt/adt05.lc 11:22-11:26 | ||
118 | Bool | ||
119 | testdata/language-features/adt/adt05.lc 11:22-12:27 | ||
120 | TList _a -> Bool | ||
121 | testdata/language-features/adt/adt05.lc 12:22-12:27 | ||
122 | Bool | ||
123 | testdata/language-features/adt/adt05.lc 14:1-14:5 | ||
124 | @Type -> forall a . Num a => Bool | ||
125 | testdata/language-features/adt/adt05.lc 14:8-14:15 | ||
126 | forall a . TList a -> Bool | ||
127 | testdata/language-features/adt/adt05.lc 14:8-14:22 | ||
128 | Bool | ||
129 | testdata/language-features/adt/adt05.lc 14:8-14:25 | ||
130 | Bool -> Bool | ||
131 | testdata/language-features/adt/adt05.lc 14:8-14:39 | ||
132 | Bool | ||
133 | testdata/language-features/adt/adt05.lc 14:16-14:22 | ||
134 | forall a . TList a | ||
135 | testdata/language-features/adt/adt05.lc 14:23-14:25 | ||
136 | Bool -> Bool -> Bool | ||
137 | testdata/language-features/adt/adt05.lc 14:26-14:32 | ||
138 | forall a . TList a -> Bool | ||
139 | testdata/language-features/adt/adt05.lc 14:26-14:39 | ||
140 | Bool | ||
141 | testdata/language-features/adt/adt05.lc 14:33-14:39 | ||
142 | forall a . Num a => TList a \ No newline at end of file | ||