summaryrefslogtreecommitdiff
path: root/testdata/Prelude.out
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-05-03 16:34:31 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-05-03 16:34:31 +0200
commitfa47957b930c53d78d2da0bcb948e2fbff11f59d (patch)
tree25ba37580c8a73e9a8cc7fce31030c8a1a7dbf72 /testdata/Prelude.out
parent9c258737a3a4cfabec6804947ccf64a552db4c27 (diff)
refactoring
Diffstat (limited to 'testdata/Prelude.out')
-rw-r--r--testdata/Prelude.out264
1 files changed, 133 insertions, 131 deletions
diff --git a/testdata/Prelude.out b/testdata/Prelude.out
index 56e17569..3e8b2b17 100644
--- a/testdata/Prelude.out
+++ b/testdata/Prelude.out
@@ -27,48 +27,49 @@ uncurry
27 e) 27 e)
28 c 28 c
29pi = _rhs 3.141592653589793 29pi = _rhs 3.141592653589793
30zip :: forall (a :: _) (b :: _) . [a] -> [b] -> [HList (a : b : '[])]
30zip 31zip
31 = (\(a :: _) (b :: _) -> case'List 32 = \(a :: _) (b :: _) -> case'List
33 (\_ -> _)
34 (_rhs [])
35 (\(c :: _) (d :: _) -> case'List
32 (\_ -> _) 36 (\_ -> _)
33 (_rhs []) 37 (_rhs [])
34 (\(c :: _) (d :: _) -> case'List 38 (\(e :: _) (f :: _) -> _rhs (HCons c (HCons e HNil) : zip d f))
35 (\_ -> _) 39 b)
36 (_rhs []) 40 a
37 (\(e :: _) (f :: _) -> _rhs (HCons c (HCons e HNil) : zip d f))
38 b)
39 a)
40 :: forall (g :: _) (h :: _) . [g] -> [h] -> [HList (g : h : '[])]
41unzip 41unzip
42 = (\(a :: _) -> case'List 42 :: forall (a :: _) (b :: _) . [HList (a : b : '[])] -> HList ([a] : [b] : '[])
43 (\_ -> _) 43unzip
44 (_rhs (HCons [] (HCons [] HNil))) 44 = \(a :: _) -> case'List
45 (\(b :: _) (c :: _) -> hlistConsCase 45 (\_ -> _)
46 (_rhs (HCons [] (HCons [] HNil)))
47 (\(b :: _) (c :: _) -> hlistConsCase
48 _
49 (\(d :: _) (e :: _) -> hlistConsCase
46 _ 50 _
47 (\(d :: _) (e :: _) -> hlistConsCase 51 (\(f :: _) (g :: _) -> hlistNilCase
48 _ 52 _
49 (\(f :: _) (g :: _) -> hlistNilCase 53 (_rhs
50 _ 54 \(h := _rhs (unzip c))
51 (_rhs 55 (i
52 \(h := _rhs (unzip c)) 56 := _rhs
53 (i 57 ((\(k :: _) -> hlistConsCase
54 := _rhs 58 _
55 ((\(k :: _) -> hlistConsCase 59 (\_ (l :: _) -> hlistConsCase _ (\(m :: _) (n :: _) -> hlistNilCase _ m n) l)
56 _ 60 k)
57 (\_ (l :: _) -> hlistConsCase _ (\(m :: _) (n :: _) -> hlistNilCase _ m n) l) 61 h))
58 k) 62 (j
59 h)) 63 := _rhs
60 (j 64 ((\(o :: _) -> hlistConsCase
61 := _rhs 65 _
62 ((\(o :: _) -> hlistConsCase 66 (\(p :: _) (q :: _) -> hlistConsCase _ (\_ (r :: _) -> hlistNilCase _ p r) q)
63 _ 67 o)
64 (\(p :: _) (q :: _) -> hlistConsCase _ (\_ (r :: _) -> hlistNilCase _ p r) q) 68 h)) -> HCons (d : j) (HCons (f : i) HNil))
65 o) 69 g)
66 h)) -> HCons (d : j) (HCons (f : i) HNil)) 70 e)
67 g) 71 b)
68 e) 72 a
69 b)
70 a)
71 :: forall (s :: _) (t :: _) . [HList (s : t : '[])] -> HList ([s] : [t] : '[])
72filter 73filter
73 = \(a :: _) (b :: _) -> case'List 74 = \(a :: _) (b :: _) -> case'List
74 (\_ -> _) 75 (\_ -> _)
@@ -76,12 +77,11 @@ filter
76 (\(c :: _) (d :: _) -> _rhs 77 (\(c :: _) (d :: _) -> _rhs
77 ((\(e :: _) -> case'Bool (\_ -> _) (filter a d) (c : filter a d) e) (a c))) 78 ((\(e :: _) -> case'Bool (\_ -> _) (filter a d) (c : filter a d) e) (a c)))
78 b 79 b
80tail :: forall (a :: _) . [a] -> [a]
79tail 81tail
80 = (\(a :: _) -> case'List (\_ -> _) (_rhs undefined) (\_ (b :: _) -> _rhs b) a) 82 = \(a :: _) -> case'List (\_ -> _) (_rhs undefined) (\_ (b :: _) -> _rhs b) a
81 :: forall (c :: _) . [c] -> [c] 83pairs :: forall (a :: _) . [a] -> [HList (a : a : '[])]
82pairs 84pairs = \(a :: _) -> _rhs (zip a (tail a))
83 = (\(a :: _) -> _rhs (zip a (tail a)))
84 :: forall (b :: _) . [b] -> [HList (b : b : '[])]
85foldl' 85foldl'
86 = \(a :: _) (b :: _) (c :: _) -> case'List 86 = \(a :: _) (b :: _) (c :: _) -> case'List
87 (\_ -> _) 87 (\_ -> _)
@@ -142,9 +142,8 @@ sortBy
142 (\_ _ -> _rhs (uncurry (mergeBy a) ((sortBy a *** sortBy a) (split b)))) 142 (\_ _ -> _rhs (uncurry (mergeBy a) ((sortBy a *** sortBy a) (split b))))
143 d) 143 d)
144 b 144 b
145iterate 145iterate :: forall (a :: _) . (a -> a) -> a -> [a]
146 = (\(a :: _) (b :: _) -> _rhs (b : iterate a (a b))) 146iterate = \(a :: _) (b :: _) -> _rhs (b : iterate a (a b))
147 :: forall (c :: _) . (c -> c) -> c -> [c]
148fst 147fst
149 = \(a :: _) -> hlistConsCase 148 = \(a :: _) -> hlistConsCase
150 _ 149 _
@@ -183,30 +182,31 @@ isKeyC
183fstTup = _rhs (hlistConsCase (_ :: _) \(a :: _) _ -> a) 182fstTup = _rhs (hlistConsCase (_ :: _) \(a :: _) _ -> a)
184sndTup = _rhs (hlistConsCase (_ :: _) \_ (a :: _) -> a) 183sndTup = _rhs (hlistConsCase (_ :: _) \_ (a :: _) -> a)
185project 184project
186 = (\ @(a :: _) @(b :: _) (c :: _) @_ (d :: _) -> case'List 185 :: forall (a :: _) (b :: [RecItem])
186 . forall (c :: String) -> isKeyC c a b => RecordC b -> a
187project
188 = \ @(a :: _) @(b :: _) (c :: _) @_ (d :: _) -> case'List
189 (\_ -> _)
190 (_rhs undefined)
191 (\(e :: _) (f :: _) -> case'RecItem
187 (\_ -> _) 192 (\_ -> _)
188 (_rhs undefined) 193 (\(g :: _) _ -> case'RecordC
189 (\(e :: _) (f :: _) -> case'RecItem
190 (\_ -> _) 194 (\_ -> _)
191 (\(g :: _) _ -> case'RecordC 195 (\(h :: _) -> case'Bool
192 (\_ -> _) 196 (\_ -> _)
193 (\(h :: _) -> case'Bool 197 (_rhs
194 (\_ -> _) 198 (project
195 (_rhs 199 @a
196 (project 200 @f
197 @a 201 c
198 @f 202 @(undefined @(isKeyC c a f))
199 c 203 (RecordCons
200 @(undefined @(isKeyC c a f)) 204 (sndTup (unsafeCoerce @(_ :: _) @('HList (a : map recItemType f)) h)))))
201 (RecordCons 205 (_rhs (fstTup (unsafeCoerce @(_ :: _) @('HList (a : map recItemType f)) h)))
202 (sndTup (unsafeCoerce @(_ :: _) @('HList (a : map recItemType f)) h))))) 206 (c == g))
203 (_rhs (fstTup (unsafeCoerce @(_ :: _) @('HList (a : map recItemType f)) h))) 207 d)
204 (c == g)) 208 e)
205 d) 209 b
206 e)
207 b)
208 :: forall (i :: _) (j :: [RecItem])
209 . forall (k :: String) -> isKeyC k i j => RecordC j -> i
210rgb = \(a :: _) (b :: _) (c :: _) -> _rhs (V4 a b c 1.0) 210rgb = \(a :: _) (b :: _) (c :: _) -> _rhs (V4 a b c 1.0)
211black = _rhs (rgb 0.0 0.0 0.0) 211black = _rhs (rgb 0.0 0.0 0.0)
212gray = _rhs (rgb 0.5 0.5 0.5) 212gray = _rhs (rgb 0.5 0.5 0.5)
@@ -227,10 +227,10 @@ fuchsia = _rhs (rgb 1.0 0.0 1.0)
227colorImage1 = _rhs (ColorImage @(fromInt 1)) 227colorImage1 = _rhs (ColorImage @(fromInt 1))
228colorImage2 = _rhs (ColorImage @(fromInt 2)) 228colorImage2 = _rhs (ColorImage @(fromInt 2))
229depthImage1 = _rhs (DepthImage @(fromInt 1)) 229depthImage1 = _rhs (DepthImage @(fromInt 1))
230v3FToV4F :: Vec (fromInt 3) Float -> Vec (fromInt 4) Float
230v3FToV4F 231v3FToV4F
231 = (\(a :: _) -> _rhs 232 = \(a :: _) -> _rhs
232 (V4 (swizzscalar a Sx) (swizzscalar a Sy) (swizzscalar a Sz) (fromInt 1))) 233 (V4 (swizzscalar a Sx) (swizzscalar a Sy) (swizzscalar a Sz) (fromInt 1))
233 :: Vec (fromInt 3) Float -> Vec (fromInt 4) Float
234radians = _rhs PrimRadians 234radians = _rhs PrimRadians
235degrees = _rhs PrimDegrees 235degrees = _rhs PrimDegrees
236sin = _rhs PrimSin 236sin = _rhs PrimSin
@@ -358,23 +358,24 @@ infixl 6 -!
358(/!) = \(a :: _) (b :: _) -> _rhs (PrimDivS a b) 358(/!) = \(a :: _) (b :: _) -> _rhs (PrimDivS a b)
359(%!) = \(a :: _) (b :: _) -> _rhs (PrimModS a b) 359(%!) = \(a :: _) (b :: _) -> _rhs (PrimModS a b)
360perspective 360perspective
361 = (\(a :: _) (b :: _) (c :: _) (d :: _) -> _rhs 361 :: Float -> Float -> Float -> Float -> Mat (fromInt 4) (fromInt 4) Float
362 \(e := _rhs (a * tan (c / fromInt 2))) 362perspective
363 (f := _rhs (fromInt 0 - e)) 363 = \(a :: _) (b :: _) (c :: _) (d :: _) -> _rhs
364 (g := _rhs (d * e)) (h := _rhs (fromInt 0 - g)) -> M44F 364 \(e := _rhs (a * tan (c / fromInt 2)))
365 (V4 (fromInt 2 * a / (g - h)) (fromInt 0) (fromInt 0) (fromInt 0)) 365 (f := _rhs (fromInt 0 - e))
366 (V4 (fromInt 0) (fromInt 2 * a / (e - f)) (fromInt 0) (fromInt 0)) 366 (g := _rhs (d * e)) (h := _rhs (fromInt 0 - g)) -> M44F
367 (V4 367 (V4 (fromInt 2 * a / (g - h)) (fromInt 0) (fromInt 0) (fromInt 0))
368 ((g + h) / (g - h)) 368 (V4 (fromInt 0) (fromInt 2 * a / (e - f)) (fromInt 0) (fromInt 0))
369 ((e + f) / (e - f)) 369 (V4
370 (fromInt 0 - (b + a) / (b - a)) 370 ((g + h) / (g - h))
371 (fromInt 0 - fromInt 1)) 371 ((e + f) / (e - f))
372 (V4 372 (fromInt 0 - (b + a) / (b - a))
373 (fromInt 0) 373 (fromInt 0 - fromInt 1))
374 (fromInt 0) 374 (V4
375 (fromInt 0 - fromInt 2 * b * a / (b - a)) 375 (fromInt 0)
376 (fromInt 0))) 376 (fromInt 0)
377 :: Float -> Float -> Float -> Float -> Mat (fromInt 4) (fromInt 4) Float 377 (fromInt 0 - fromInt 2 * b * a / (b - a))
378 (fromInt 0))
378rotMatrixZ 379rotMatrixZ
379 = \(a :: _) -> _rhs 380 = \(a :: _) -> _rhs
380 \(b := _rhs (cos a)) (c := _rhs (sin a)) -> M44F 381 \(b := _rhs (cos a)) (c := _rhs (sin a)) -> M44F
@@ -399,58 +400,59 @@ rotMatrixX
399rotationEuler 400rotationEuler
400 = \(a :: _) (b :: _) (c :: _) -> _rhs 401 = \(a :: _) (b :: _) (c :: _) -> _rhs
401 (rotMatrixY a .*. rotMatrixX b .*. rotMatrixZ c) 402 (rotMatrixY a .*. rotMatrixX b .*. rotMatrixZ c)
403translateBefore4 :: Vec (fromInt 3) Float -> Mat (fromInt 4) (fromInt 4) Float
402translateBefore4 404translateBefore4
403 = (\(a :: _) -> _rhs 405 = \(a :: _) -> _rhs
404 \(b := _rhs (V4 (fromInt 1) (fromInt 0) (fromInt 0) (fromInt 0))) 406 \(b := _rhs (V4 (fromInt 1) (fromInt 0) (fromInt 0) (fromInt 0)))
405 (c := _rhs (V4 (fromInt 0) (fromInt 1) (fromInt 0) (fromInt 0))) 407 (c := _rhs (V4 (fromInt 0) (fromInt 1) (fromInt 0) (fromInt 0)))
406 (d := _rhs (V4 (fromInt 0) (fromInt 0) (fromInt 1) (fromInt 0))) 408 (d := _rhs (V4 (fromInt 0) (fromInt 0) (fromInt 1) (fromInt 0)))
407 (e 409 (e
408 := _rhs 410 := _rhs
409 (V4 411 (V4
410 (swizzscalar a Sx) 412 (swizzscalar a Sx)
411 (swizzscalar a Sy) 413 (swizzscalar a Sy)
412 (swizzscalar a Sz) 414 (swizzscalar a Sz)
413 (fromInt 1))) -> M44F b c d e) 415 (fromInt 1))) -> M44F b c d e
414 :: Vec (fromInt 3) Float -> Mat (fromInt 4) (fromInt 4) Float
415lookat 416lookat
416 = (\(a :: _) (b :: _) (c :: _) -> _rhs 417 :: Vec (fromInt 3) Float
417 \(d 418 -> Vec (fromInt 3) Float
418 := \(i :: _) -> _rhs 419 -> Vec (fromInt 3) Float -> Mat (fromInt 4) (fromInt 4) Float
419 (V4 (swizzscalar i Sx) (swizzscalar i Sy) (swizzscalar i Sz) (fromInt 0))) 420lookat
420 (e := _rhs (normalize $ a - b)) 421 = \(a :: _) (b :: _) (c :: _) -> _rhs
421 (f := _rhs (normalize $ c `cross` e)) 422 \(d
422 (g := _rhs (e `cross` f)) 423 := \(i :: _) -> _rhs
423 (h 424 (V4 (swizzscalar i Sx) (swizzscalar i Sy) (swizzscalar i Sz) (fromInt 0)))
424 := _rhs 425 (e := _rhs (normalize $ a - b))
425 (transpose 426 (f := _rhs (normalize $ c `cross` e))
426 $ M44F 427 (g := _rhs (e `cross` f))
427 (d f) 428 (h
428 (d g) 429 := _rhs
429 (d e) 430 (transpose
430 (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1)))) -> h 431 $ M44F
431 .*. translateBefore4 (neg a)) 432 (d f)
432 :: Vec (fromInt 3) Float 433 (d g)
433 -> Vec (fromInt 3) Float 434 (d e)
434 -> Vec (fromInt 3) Float -> Mat (fromInt 4) (fromInt 4) Float 435 (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1)))) -> h
436 .*. translateBefore4 (neg a)
435scale = \(a :: _) (b :: _) -> _rhs (b * V4 a a a 1.0) 437scale = \(a :: _) (b :: _) -> _rhs (b * V4 a a a 1.0)
438fromTo :: Float -> Float -> [Float]
436fromTo 439fromTo
437 = (\(a :: _) (b :: _) -> case'Bool 440 = \(a :: _) (b :: _) -> case'Bool
438 (\_ -> _) 441 (\_ -> _)
439 (_rhs (a : fromTo (a + fromInt 1) b)) 442 (_rhs (a : fromTo (a + fromInt 1) b))
440 (_rhs []) 443 (_rhs [])
441 (a > b)) 444 (a > b)
442 :: Float -> Float -> [Float] 445(!!) :: forall (a :: _) . [a] -> Int -> a
443(!!) 446(!!)
444 = (\(a :: _) (b :: _) -> case'List 447 = \(a :: _) (b :: _) -> case'List
448 (\_ -> _)
449 (_rhs undefined)
450 (\(c :: _) (d :: _) -> case'Bool
445 (\_ -> _) 451 (\_ -> _)
446 (_rhs undefined) 452 (_rhs (d !! (b - fromInt 1)))
447 (\(c :: _) (d :: _) -> case'Bool 453 (_rhs c)
448 (\_ -> _) 454 (fromInt 0 == b))
449 (_rhs (d !! (b - fromInt 1))) 455 a
450 (_rhs c)
451 (fromInt 0 == b))
452 a)
453 :: forall (e :: _) . [e] -> Int -> e
454main is not found 456main is not found
455------------ trace 457------------ trace
456const :: forall a b . a -> b -> a 458const :: forall a b . a -> b -> a