summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-05-13 23:05:19 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-05-13 23:05:19 +0200
commit935e60f12569f521216b56d8acf01de721e5168e (patch)
treec5992970c67adf4b9b17a4f2fb5f87c0cc6b2743 /testdata
parent8f2e602cada9141b653802cf1084b9bdfd6e0d06 (diff)
refactoring
Diffstat (limited to 'testdata')
-rw-r--r--testdata/Builtins.out12
-rw-r--r--testdata/Internals.out54
-rw-r--r--testdata/Prelude.out116
-rw-r--r--testdata/primes.out2
-rw-r--r--testdata/zip01.out12
5 files changed, 95 insertions, 101 deletions
diff --git a/testdata/Builtins.out b/testdata/Builtins.out
index 97d4d268..badc1d2b 100644
--- a/testdata/Builtins.out
+++ b/testdata/Builtins.out
@@ -1196,17 +1196,17 @@ rasterizePrimitives
1196allSame :: forall (a :: _) . [a] -> Constraint 1196allSame :: forall (a :: _) . [a] -> Constraint
1197allSame 1197allSame
1198 = primFix 1198 = primFix
1199 \(a :: forall (b :: _) . [b] -> Constraint) -> _lhs 1199 \(a :: _) -> _lhs
1200 allSame 1200 allSame
1201 \(c :: _) -> case'List 1201 \(b :: _) -> case'List
1202 (\(_ :: _) -> _) 1202 (\(_ :: _) -> _)
1203 (_rhs 'CUnit) 1203 (_rhs 'CUnit)
1204 (\(d :: _) (e :: _) -> case'List 1204 (\(c :: _) (d :: _) -> case'List
1205 (\(_ :: _) -> _) 1205 (\(_ :: _) -> _)
1206 (_rhs 'CUnit) 1206 (_rhs 'CUnit)
1207 (\(f :: _) (g :: _) -> _rhs ('T2 (d `'EqCTt` f) (a (f : g)))) 1207 (\(e :: _) (f :: _) -> _rhs ('T2 (c `'EqCTt` e) (a (e : f))))
1208 e) 1208 d)
1209 c 1209 b
1210 1210
1211sameLayerCounts 1211sameLayerCounts
1212 = _lhs sameLayerCounts \(a :: _) -> _rhs (allSame (map 'ImageLC a)) 1212 = _lhs sameLayerCounts \(a :: _) -> _rhs (allSame (map 'ImageLC a))
diff --git a/testdata/Internals.out b/testdata/Internals.out
index 02440c19..48565b86 100644
--- a/testdata/Internals.out
+++ b/testdata/Internals.out
@@ -231,62 +231,62 @@ negate
231(==) :: forall a . Eq a => a -> a -> Bool 231(==) :: forall a . Eq a => a -> a -> Bool
232(==) 232(==)
233 = primFix 233 = primFix
234 \(a :: forall b . Eq b => b -> b -> Bool) -> _lhs 234 \(a :: _) -> _lhs
235 (==) 235 (==)
236 \ @c @(_ :: _) -> match'String 236 \ @b @(_ :: _) -> match'String
237 (\(_ :: _) -> _) 237 (\(_ :: _) -> _)
238 (_rhs 238 (_rhs
239 let 239 let
240 d = _lhs (==) \(e :: _) (f :: _) -> _rhs (isEQ (primCompareString e f)) 240 c = _lhs (==) \(d :: _) (e :: _) -> _rhs (isEQ (primCompareString d e))
241 in d) 241 in c)
242 c 242 b
243 (match'Char 243 (match'Char
244 (\(_ :: _) -> _) 244 (\(_ :: _) -> _)
245 (_rhs 245 (_rhs
246 let g = _lhs (==) \(h :: _) (i :: _) -> _rhs (isEQ (primCompareChar h i)) in g) 246 let f = _lhs (==) \(g :: _) (h :: _) -> _rhs (isEQ (primCompareChar g h)) in f)
247 c 247 b
248 (match'Int 248 (match'Int
249 (\(_ :: _) -> _) 249 (\(_ :: _) -> _)
250 (_rhs 250 (_rhs
251 let j = _lhs (==) \(k :: _) (l :: _) -> _rhs (isEQ (primCompareInt k l)) in j) 251 let i = _lhs (==) \(j :: _) (k :: _) -> _rhs (isEQ (primCompareInt j k)) in i)
252 c 252 b
253 (match'Float 253 (match'Float
254 (\(_ :: _) -> _) 254 (\(_ :: _) -> _)
255 (_rhs 255 (_rhs
256 let m = _lhs (==) \(n :: _) (o :: _) -> _rhs (isEQ (primCompareFloat n o)) in m) 256 let l = _lhs (==) \(m :: _) (n :: _) -> _rhs (isEQ (primCompareFloat m n)) in l)
257 c 257 b
258 (match'Bool 258 (match'Bool
259 (\(_ :: _) -> _) 259 (\(_ :: _) -> _)
260 (_rhs 260 (_rhs
261 let 261 let
262 p 262 o
263 = _lhs 263 = _lhs
264 (==) 264 (==)
265 \(q :: _) (r :: _) -> case'Bool 265 \(p :: _) (q :: _) -> case'Bool
266 (\(_ :: _) -> _) 266 (\(_ :: _) -> _)
267 (case'Bool (\(_ :: _) -> _) (_rhs True) (_rhs False) r) 267 (case'Bool (\(_ :: _) -> _) (_rhs True) (_rhs False) q)
268 (case'Bool (\(_ :: _) -> _) (_rhs False) (_rhs True) r) 268 (case'Bool (\(_ :: _) -> _) (_rhs False) (_rhs True) q)
269 q 269 p
270 in p) 270 in o)
271 c 271 b
272 (match'Nat 272 (match'Nat
273 (\(_ :: _) -> _) 273 (\(_ :: _) -> _)
274 (_rhs 274 (_rhs
275 let 275 let
276 s 276 r
277 = _lhs 277 = _lhs
278 (==) 278 (==)
279 \(t :: _) (u :: _) -> case'Nat 279 \(s :: _) (t :: _) -> case'Nat
280 (\(_ :: _) -> _) 280 (\(_ :: _) -> _)
281 (case'Nat (\(_ :: _) -> _) (_rhs True) (\(_ :: _) -> _rhs False) u) 281 (case'Nat (\(_ :: _) -> _) (_rhs True) (\(_ :: _) -> _rhs False) t)
282 (\(v :: _) -> case'Nat 282 (\(u :: _) -> case'Nat
283 (\(_ :: _) -> _) 283 (\(_ :: _) -> _)
284 (_rhs False) 284 (_rhs False)
285 (\(w :: _) -> _rhs (a v w)) 285 (\(v :: _) -> _rhs (a u v))
286 u) 286 t)
287 t 287 s
288 in s) 288 in r)
289 c 289 b
290 (_rhs undefined)))))) 290 (_rhs undefined))))))
291 291
292infix 4 == 292infix 4 ==
diff --git a/testdata/Prelude.out b/testdata/Prelude.out
index 0bad198a..0e590604 100644
--- a/testdata/Prelude.out
+++ b/testdata/Prelude.out
@@ -49,58 +49,58 @@ pi = _lhs pi (_rhs 3.141592653589793)
49zip :: forall (a :: _) (b :: _) . [a] -> [b] -> [(a, b)] 49zip :: forall (a :: _) (b :: _) . [a] -> [b] -> [(a, b)]
50zip 50zip
51 = primFix 51 = primFix
52 \(a :: forall (b :: _) (c :: _) . [b] -> [c] -> [(b, c)]) -> _lhs 52 \(a :: _) -> _lhs
53 zip 53 zip
54 \(d :: _) (e :: _) -> case'List 54 \(b :: _) (c :: _) -> case'List
55 (\(_ :: _) -> _) 55 (\(_ :: _) -> _)
56 (_rhs []) 56 (_rhs [])
57 (\(f :: _) (g :: _) -> case'List 57 (\(d :: _) (e :: _) -> case'List
58 (\(_ :: _) -> _) 58 (\(_ :: _) -> _)
59 (_rhs []) 59 (_rhs [])
60 (\(h :: _) (i :: _) -> _rhs ((f, h) : a g i)) 60 (\(f :: _) (g :: _) -> _rhs ((d, f) : a e g))
61 e) 61 c)
62 d 62 b
63 63
64unzip :: forall (a :: _) (b :: _) . [(a, b)] -> ([a], [b]) 64unzip :: forall (a :: _) (b :: _) . [(a, b)] -> ([a], [b])
65unzip 65unzip
66 = primFix 66 = primFix
67 \(a :: forall (b :: _) (c :: _) . [(b, c)] -> ([b], [c])) -> _lhs 67 \(a :: _) -> _lhs
68 unzip 68 unzip
69 \(d :: _) -> case'List 69 \(b :: _) -> case'List
70 (\(_ :: _) -> _) 70 (\(_ :: _) -> _)
71 (_rhs ([], [])) 71 (_rhs ([], []))
72 (\(e :: _) (f :: _) -> hlistConsCase 72 (\(c :: _) (d :: _) -> hlistConsCase
73 _ 73 _
74 (\(g :: _) (h :: _) -> hlistConsCase 74 (\(e :: _) (f :: _) -> hlistConsCase
75 _ 75 _
76 (\(i :: _) (j :: _) -> hlistNilCase 76 (\(g :: _) (h :: _) -> hlistNilCase
77 _ 77 _
78 (_rhs 78 (_rhs
79 let 79 let
80 k = a f; 80 i = a d;
81 l 81 j
82 = (\(n :: _) -> hlistConsCase 82 = (\(l :: _) -> hlistConsCase
83 _ 83 _
84 (\(_ :: _) (o :: _) -> hlistConsCase 84 (\(_ :: _) (m :: _) -> hlistConsCase
85 _ 85 _
86 (\(p :: _) (q :: _) -> hlistNilCase _ p q) 86 (\(n :: _) (o :: _) -> hlistNilCase _ n o)
87 o) 87 m)
88 n) 88 l)
89 k; 89 i;
90 m 90 k
91 = (\(r :: _) -> hlistConsCase 91 = (\(p :: _) -> hlistConsCase
92 _ 92 _
93 (\(s :: _) (t :: _) -> hlistConsCase 93 (\(q :: _) (r :: _) -> hlistConsCase
94 _ 94 _
95 (\(_ :: _) (u :: _) -> hlistNilCase _ s u) 95 (\(_ :: _) (s :: _) -> hlistNilCase _ q s)
96 t) 96 r)
97 r) 97 p)
98 k 98 i
99 in (g : m, i : l)) 99 in (e : k, g : j))
100 j) 100 h)
101 h) 101 f)
102 e) 102 c)
103 d 103 b
104 104
105filter 105filter
106 = primFix 106 = primFix
@@ -213,10 +213,7 @@ sortBy
213 213
214iterate :: forall (a :: _) . (a -> a) -> a -> [a] 214iterate :: forall (a :: _) . (a -> a) -> a -> [a]
215iterate 215iterate
216 = primFix 216 = primFix \(a :: _) -> _lhs iterate \(b :: _) (c :: _) -> _rhs (c : a b (b c))
217 \(a :: forall (b :: _) . (b -> b) -> b -> [b]) -> _lhs
218 iterate
219 \(c :: _) (d :: _) -> _rhs (d : a c (c d))
220 217
221fst 218fst
222 = _lhs 219 = _lhs
@@ -287,33 +284,30 @@ project
287 . forall (c :: String) -> isKeyC c a b => RecordC b -> a 284 . forall (c :: String) -> isKeyC c a b => RecordC b -> a
288project 285project
289 = primFix 286 = primFix
290 \(a 287 \(a :: _) -> _lhs
291 :: forall (b :: _) (c :: [RecItem])
292 . forall (d :: String) -> isKeyC d b c => RecordC c -> b)
293 -> _lhs
294 project 288 project
295 \ @(e :: _) @(f :: _) (g :: _) @(_ :: _) (h :: _) -> case'List 289 \ @(b :: _) @(c :: _) (d :: _) @(_ :: _) (e :: _) -> case'List
296 (\(_ :: _) -> _) 290 (\(_ :: _) -> _)
297 (_rhs undefined) 291 (_rhs undefined)
298 (\(i :: _) (j :: _) -> case'RecItem 292 (\(f :: _) (g :: _) -> case'RecItem
299 (\(_ :: _) -> _) 293 (\(_ :: _) -> _)
300 (\(k :: _) (_ :: _) -> case'RecordC 294 (\(h :: _) (_ :: _) -> case'RecordC
301 (\(_ :: _) -> _) 295 (\(_ :: _) -> _)
302 (\(l :: _) -> case'Bool 296 (\(i :: _) -> case'Bool
303 (\(_ :: _) -> _) 297 (\(_ :: _) -> _)
304 (_rhs 298 (_rhs
305 (a 299 (a
306 @e 300 @b
307 @j 301 @g
308 g 302 d
309 @(undefined @('CW (isKeyC g e j))) 303 @(undefined @('CW (isKeyC d b g)))
310 (RecordCons 304 (RecordCons
311 (sndTup (unsafeCoerce @(_ :: _) @('HList (e : map recItemType j)) l))))) 305 (sndTup (unsafeCoerce @(_ :: _) @('HList (b : map recItemType g)) i)))))
312 (_rhs (fstTup (unsafeCoerce @(_ :: _) @('HList (e : map recItemType j)) l))) 306 (_rhs (fstTup (unsafeCoerce @(_ :: _) @('HList (b : map recItemType g)) i)))
313 (g == k)) 307 (d == h))
314 h) 308 e)
315 i) 309 f)
316 f 310 c
317 311
318rgb = _lhs rgb \(a :: _) (b :: _) (c :: _) -> _rhs (V4 a b c 1.0) 312rgb = _lhs rgb \(a :: _) (b :: _) (c :: _) -> _rhs (V4 a b c 1.0)
319 313
@@ -711,7 +705,7 @@ scale = _lhs scale \(a :: _) (b :: _) -> _rhs (b * V4 a a a 1.0)
711fromTo :: Float -> Float -> [Float] 705fromTo :: Float -> Float -> [Float]
712fromTo 706fromTo
713 = primFix 707 = primFix
714 \(a :: Float -> Float -> [Float]) -> _lhs 708 \(a :: _) -> _lhs
715 fromTo 709 fromTo
716 \(b :: _) (c :: _) -> case'Bool 710 \(b :: _) (c :: _) -> case'Bool
717 (\(_ :: _) -> _) 711 (\(_ :: _) -> _)
@@ -722,17 +716,17 @@ fromTo
722(!!) :: forall (a :: _) . [a] -> Int -> a 716(!!) :: forall (a :: _) . [a] -> Int -> a
723(!!) 717(!!)
724 = primFix 718 = primFix
725 \(a :: forall (b :: _) . [b] -> Int -> b) -> _lhs 719 \(a :: _) -> _lhs
726 (!!) 720 (!!)
727 \(c :: _) (d :: _) -> case'List 721 \(b :: _) (c :: _) -> case'List
728 (\(_ :: _) -> _) 722 (\(_ :: _) -> _)
729 (_rhs undefined) 723 (_rhs undefined)
730 (\(e :: _) (f :: _) -> case'Bool 724 (\(d :: _) (e :: _) -> case'Bool
731 (\(_ :: _) -> _) 725 (\(_ :: _) -> _)
732 (_rhs (a f (d - fromInt 1))) 726 (_rhs (a e (c - fromInt 1)))
733 (_rhs e) 727 (_rhs d)
734 (fromInt 0 == d)) 728 (fromInt 0 == c))
735 c 729 b
736------------ core code 730------------ core code
737!! :: forall a . [a] -> Int -> a 731!! :: forall a . [a] -> Int -> a
738!! 732!!
diff --git a/testdata/primes.out b/testdata/primes.out
index 2bd162c9..aa9f5a22 100644
--- a/testdata/primes.out
+++ b/testdata/primes.out
@@ -72,7 +72,7 @@ from = primFix \(a :: _) -> _lhs from \(b :: _) -> _rhs (b : a (b + fromInt 1))
72primes :: [Int] 72primes :: [Int]
73primes 73primes
74 = primFix 74 = primFix
75 \(a :: [Int]) -> _lhs 75 \(a :: _) -> _lhs
76 primes 76 primes
77 (_rhs 77 (_rhs
78 (fromInt 2 78 (fromInt 2
diff --git a/testdata/zip01.out b/testdata/zip01.out
index e916ee41..3dc008b9 100644
--- a/testdata/zip01.out
+++ b/testdata/zip01.out
@@ -3,17 +3,17 @@ main is not found
3zip2 :: forall (a :: _) (b :: _) . [a] -> [b] -> [(a, b)] 3zip2 :: forall (a :: _) (b :: _) . [a] -> [b] -> [(a, b)]
4zip2 4zip2
5 = primFix 5 = primFix
6 \(a :: forall (b :: _) (c :: _) . [b] -> [c] -> [(b, c)]) -> _lhs 6 \(a :: _) -> _lhs
7 zip2 7 zip2
8 \(d :: _) (e :: _) -> case'List 8 \(b :: _) (c :: _) -> case'List
9 (\(_ :: _) -> _) 9 (\(_ :: _) -> _)
10 (_rhs []) 10 (_rhs [])
11 (\(f :: _) (g :: _) -> case'List 11 (\(d :: _) (e :: _) -> case'List
12 (\(_ :: _) -> _) 12 (\(_ :: _) -> _)
13 (_rhs []) 13 (_rhs [])
14 (\(h :: _) (i :: _) -> _rhs ((f, h) : a g i)) 14 (\(f :: _) (g :: _) -> _rhs ((d, f) : a e g))
15 e) 15 c)
16 d 16 b
17------------ core code 17------------ core code
18zip2 :: forall a b . [a] -> [b] -> [(a, b)] 18zip2 :: forall a b . [a] -> [b] -> [(a, b)]
19zip2 19zip2