diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-05-06 12:29:36 +0200 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-05-06 12:29:36 +0200 |
commit | d353a29bb93d3105a763465300b28250117c3f40 (patch) | |
tree | 1517e23109d5e3c266b634b3c7af4dd4ca29e4d7 /testdata/data.out | |
parent | 3430070058610b6aeab2543bc050bb1cf2e95d0c (diff) |
show typechecked source code in .out files & fix local function handling (again)
Diffstat (limited to 'testdata/data.out')
-rw-r--r-- | testdata/data.out | 165 |
1 files changed, 125 insertions, 40 deletions
diff --git a/testdata/data.out b/testdata/data.out index 1f6a592f..1d441619 100644 --- a/testdata/data.out +++ b/testdata/data.out | |||
@@ -14,19 +14,19 @@ data Data2 :: Type where | |||
14 | 14 | ||
15 | x | 15 | x |
16 | = \(a :: _) -> case'Data2 | 16 | = \(a :: _) -> case'Data2 |
17 | (\_ -> _) | 17 | (\(_ :: _) -> _) |
18 | (\_ -> _rhs undefined) | 18 | (\(_ :: _) -> _rhs undefined) |
19 | (\(b :: _) _ -> _rhs b) | 19 | (\(b :: _) (_ :: _) -> _rhs b) |
20 | (\(c :: _) -> _rhs c) | 20 | (\(c :: _) -> _rhs c) |
21 | (_rhs undefined) | 21 | (_rhs undefined) |
22 | a | 22 | a |
23 | 23 | ||
24 | y | 24 | y |
25 | = \(a :: _) -> case'Data2 | 25 | = \(a :: _) -> case'Data2 |
26 | (\_ -> _) | 26 | (\(_ :: _) -> _) |
27 | (\_ -> _rhs undefined) | 27 | (\(_ :: _) -> _rhs undefined) |
28 | (\_ (b :: _) -> _rhs b) | 28 | (\(_ :: _) (b :: _) -> _rhs b) |
29 | (\_ -> _rhs undefined) | 29 | (\(_ :: _) -> _rhs undefined) |
30 | (_rhs undefined) | 30 | (_rhs undefined) |
31 | a | 31 | a |
32 | 32 | ||
@@ -37,61 +37,115 @@ data Data5 (_ :: Type) (_ :: Type) (_ :: Type) :: Type where | |||
37 | 37 | ||
38 | a5 | 38 | a5 |
39 | = \(a :: _) -> case'Data5 | 39 | = \(a :: _) -> case'Data5 |
40 | (\_ -> _) | 40 | (\(_ :: _) -> _) |
41 | (\(b :: _) -> _rhs b) | 41 | (\(b :: _) -> _rhs b) |
42 | (\(c :: _) _ _ -> _rhs c) | 42 | (\(c :: _) (_ :: _) (_ :: _) -> _rhs c) |
43 | (\_ _ _ _ _ -> _rhs undefined) | 43 | (\(_ :: _) (_ :: _) (_ :: _) (_ :: _) (_ :: _) -> _rhs undefined) |
44 | a | 44 | a |
45 | 45 | ||
46 | b5 | 46 | b5 |
47 | = \(a :: _) -> case'Data5 | 47 | = \(a :: _) -> case'Data5 |
48 | (\_ -> _) | 48 | (\(_ :: _) -> _) |
49 | (\_ -> _rhs undefined) | 49 | (\(_ :: _) -> _rhs undefined) |
50 | (\_ (b :: _) _ -> _rhs b) | 50 | (\(_ :: _) (b :: _) (_ :: _) -> _rhs b) |
51 | (\_ _ _ _ _ -> _rhs undefined) | 51 | (\(_ :: _) (_ :: _) (_ :: _) (_ :: _) (_ :: _) -> _rhs undefined) |
52 | a | 52 | a |
53 | 53 | ||
54 | c5 | 54 | c5 |
55 | = \(a :: _) -> case'Data5 | 55 | = \(a :: _) -> case'Data5 |
56 | (\_ -> _) | 56 | (\(_ :: _) -> _) |
57 | (\_ -> _rhs undefined) | 57 | (\(_ :: _) -> _rhs undefined) |
58 | (\_ _ (b :: _) -> _rhs b) | 58 | (\(_ :: _) (_ :: _) (b :: _) -> _rhs b) |
59 | (\_ _ _ _ _ -> _rhs undefined) | 59 | (\(_ :: _) (_ :: _) (_ :: _) (_ :: _) (_ :: _) -> _rhs undefined) |
60 | a | 60 | a |
61 | ------------ trace | 61 | ------------ core code |
62 | 'Data0 :: Type | 62 | 'Data0 :: Type |
63 | 'Data0 = <<type constructor with 0 indices; constructors: Data0>> | ||
64 | |||
65 | 'Data1 :: Type -> Type -> Type -> Type | ||
66 | 'Data1 = <<type constructor with 0 indices; constructors: Data1>> | ||
67 | |||
68 | 'Data2 :: Type | ||
69 | 'Data2 | ||
70 | = <<type constructor with 0 indices; constructors: Data21, Data22, Data23, Data24>> | ||
71 | |||
72 | 'Data5 :: Type -> Type -> Type -> Type | ||
73 | 'Data5 | ||
74 | = <<type constructor with 0 indices; constructors: Data51, Data52, Data53>> | ||
75 | |||
63 | Data0 :: Data0 | 76 | Data0 :: Data0 |
77 | Data0 = <<0th constructor of 'Data0>> | ||
78 | |||
79 | Data1 :: forall a b c . a -> b -> c -> Data1 a b c | ||
80 | Data1 = <<0th constructor of 'Data1>> | ||
81 | |||
82 | Data21 :: Int -> Data2 | ||
83 | Data21 = <<0th constructor of 'Data2>> | ||
84 | |||
85 | Data22 :: Int -> Int -> Data2 | ||
86 | Data22 = <<1st constructor of 'Data2>> | ||
87 | |||
88 | Data23 :: Int -> Data2 | ||
89 | Data23 = <<2nd constructor of 'Data2>> | ||
90 | |||
91 | Data24 :: Data2 | ||
92 | Data24 = <<3rd constructor of 'Data2>> | ||
93 | |||
94 | Data51 :: forall a b c . a -> Data5 a b c | ||
95 | Data51 = <<0th constructor of 'Data5>> | ||
96 | |||
97 | Data52 :: forall a b c . a -> b -> c -> Data5 a b c | ||
98 | Data52 = <<1st constructor of 'Data5>> | ||
99 | |||
100 | Data53 :: forall a b c . Int -> a -> Float -> b -> c -> Data5 a b c | ||
101 | Data53 = <<2nd constructor of 'Data5>> | ||
102 | |||
103 | a5 :: forall a b c . Data5 a b c -> a | ||
104 | a5 | ||
105 | = \a _ _ b -> case'Data5 | ||
106 | (\_ -> a) | ||
107 | (\c -> _rhs c) | ||
108 | (\d _ _ -> _rhs d) | ||
109 | (\_ _ _ _ _ -> _rhs (undefined a)) | ||
110 | b | ||
111 | |||
112 | b5 :: forall a b c . Data5 a b c -> b | ||
113 | b5 | ||
114 | = \_ a _ b -> case'Data5 | ||
115 | (\_ -> a) | ||
116 | (\_ -> _rhs (undefined a)) | ||
117 | (\_ c _ -> _rhs c) | ||
118 | (\_ _ _ _ _ -> _rhs (undefined a)) | ||
119 | b | ||
120 | |||
121 | c5 :: forall a b c . Data5 a b c -> c | ||
122 | c5 | ||
123 | = \_ _ a b -> case'Data5 | ||
124 | (\_ -> a) | ||
125 | (\_ -> _rhs (undefined a)) | ||
126 | (\_ _ c -> _rhs c) | ||
127 | (\_ _ _ _ _ -> _rhs (undefined a)) | ||
128 | b | ||
129 | |||
64 | case'Data0 | 130 | case'Data0 |
65 | :: forall (a :: Data0 -> Type) -> a 'Data0 -> forall (b :: Data0) -> a b | 131 | :: forall (a :: Data0 -> Type) -> a 'Data0 -> forall (b :: Data0) -> a b |
66 | match'Data0 :: forall (a :: Type -> Type) -> a Data0 -> forall b -> a b -> a b | 132 | case'Data0 = \a b c -> <<case function of a type with 0 parameters>> |
67 | 'Data1 :: Type -> Type -> Type -> Type | 133 | |
68 | Data1 :: forall a b c . a -> b -> c -> Data1 a b c | ||
69 | case'Data1 | 134 | case'Data1 |
70 | :: forall a b c | 135 | :: forall a b c |
71 | . forall (d :: Data1 a b c -> Type) | 136 | . forall (d :: Data1 a b c -> Type) |
72 | -> (forall (e :: a) (f :: b) (g :: c) -> d ('Data1 e f g)) | 137 | -> (forall (e :: a) (f :: b) (g :: c) -> d ('Data1 e f g)) |
73 | -> forall (h :: Data1 a b c) -> d h | 138 | -> forall (h :: Data1 a b c) -> d h |
74 | match'Data1 | 139 | case'Data1 = \_ _ _ a b c -> <<case function of a type with 3 parameters>> |
75 | :: forall (a :: Type -> Type) | 140 | |
76 | -> (forall b c d -> a (Data1 b c d)) -> forall e -> a e -> a e | ||
77 | 'Data2 :: Type | ||
78 | Data21 :: Int -> Data2 | ||
79 | Data22 :: Int -> Int -> Data2 | ||
80 | Data23 :: Int -> Data2 | ||
81 | Data24 :: Data2 | ||
82 | case'Data2 | 141 | case'Data2 |
83 | :: forall (a :: Data2 -> Type) | 142 | :: forall (a :: Data2 -> Type) |
84 | -> (forall (b :: Int) -> a ('Data21 b)) | 143 | -> (forall (b :: Int) -> a ('Data21 b)) |
85 | -> (forall (c :: Int) (d :: Int) -> a ('Data22 c d)) | 144 | -> (forall (c :: Int) (d :: Int) -> a ('Data22 c d)) |
86 | -> (forall (e :: Int) -> a ('Data23 e)) | 145 | -> (forall (e :: Int) -> a ('Data23 e)) |
87 | -> a 'Data24 -> forall (f :: Data2) -> a f | 146 | -> a 'Data24 -> forall (f :: Data2) -> a f |
88 | match'Data2 :: forall (a :: Type -> Type) -> a Data2 -> forall b -> a b -> a b | 147 | case'Data2 = \a b c d e f -> <<case function of a type with 0 parameters>> |
89 | x :: Data2 -> Int | 148 | |
90 | y :: Data2 -> Int | ||
91 | 'Data5 :: Type -> Type -> Type -> Type | ||
92 | Data51 :: forall a b c . a -> Data5 a b c | ||
93 | Data52 :: forall a b c . a -> b -> c -> Data5 a b c | ||
94 | Data53 :: forall a b c . Int -> a -> Float -> b -> c -> Data5 a b c | ||
95 | case'Data5 | 149 | case'Data5 |
96 | :: forall a b c | 150 | :: forall a b c |
97 | . forall (d :: Data5 a b c -> Type) | 151 | . forall (d :: Data5 a b c -> Type) |
@@ -100,12 +154,43 @@ case'Data5 | |||
100 | -> (forall (i :: Int) (j :: a) (k :: Float) (l :: b) (m :: c) | 154 | -> (forall (i :: Int) (j :: a) (k :: Float) (l :: b) (m :: c) |
101 | -> d ('Data53 i j k l m)) | 155 | -> d ('Data53 i j k l m)) |
102 | -> forall (n :: Data5 a b c) -> d n | 156 | -> forall (n :: Data5 a b c) -> d n |
157 | case'Data5 = \_ _ _ a b c d e -> <<case function of a type with 3 parameters>> | ||
158 | |||
159 | match'Data0 :: forall (a :: Type -> Type) -> a Data0 -> forall b -> a b -> a b | ||
160 | match'Data0 = \a b c d -> <<type case function>> | ||
161 | |||
162 | match'Data1 | ||
163 | :: forall (a :: Type -> Type) | ||
164 | -> (forall b c d -> a (Data1 b c d)) -> forall e -> a e -> a e | ||
165 | match'Data1 = \a b c d -> <<type case function>> | ||
166 | |||
167 | match'Data2 :: forall (a :: Type -> Type) -> a Data2 -> forall b -> a b -> a b | ||
168 | match'Data2 = \a b c d -> <<type case function>> | ||
169 | |||
103 | match'Data5 | 170 | match'Data5 |
104 | :: forall (a :: Type -> Type) | 171 | :: forall (a :: Type -> Type) |
105 | -> (forall b c d -> a (Data5 b c d)) -> forall e -> a e -> a e | 172 | -> (forall b c d -> a (Data5 b c d)) -> forall e -> a e -> a e |
106 | a5 :: forall a b c . Data5 a b c -> a | 173 | match'Data5 = \a b c d -> <<type case function>> |
107 | b5 :: forall a b c . Data5 a b c -> b | 174 | |
108 | c5 :: forall a b c . Data5 a b c -> c | 175 | x :: Data2 -> Int |
176 | x | ||
177 | = \a -> case'Data2 | ||
178 | (\_ -> 'Int) | ||
179 | (\_ -> _rhs (undefined 'Int)) | ||
180 | (\b _ -> _rhs b) | ||
181 | (\c -> _rhs c) | ||
182 | (_rhs (undefined 'Int)) | ||
183 | a | ||
184 | |||
185 | y :: Data2 -> Int | ||
186 | y | ||
187 | = \a -> case'Data2 | ||
188 | (\_ -> 'Int) | ||
189 | (\_ -> _rhs (undefined 'Int)) | ||
190 | (\_ b -> _rhs b) | ||
191 | (\_ -> _rhs (undefined 'Int)) | ||
192 | (_rhs (undefined 'Int)) | ||
193 | a | ||
109 | ------------ tooltips | 194 | ------------ tooltips |
110 | testdata/data.lc 1:6-1:11 | 195 | testdata/data.lc 1:6-1:11 |
111 | Type | Type | Type | Type | Type | 196 | Type | Type | Type | Type | Type |