diff options
136 files changed, 843 insertions, 137 deletions
diff --git a/test/runTests.hs b/test/runTests.hs index 4f0f38c7..f86c4813 100644 --- a/test/runTests.hs +++ b/test/runTests.hs | |||
@@ -207,8 +207,8 @@ doTest Config{..} (i, fn) = do | |||
207 | Left (show -> e) -> Left (unlines $ tab "!Failed" e: map show (listTraceInfos i), Failed) | 207 | Left (show -> e) -> Left (unlines $ tab "!Failed" e: map show (listTraceInfos i), Failed) |
208 | Right (fname, Left (pShow -> e)) | 208 | Right (fname, Left (pShow -> e)) |
209 | -> Right ("typechecked module" | 209 | -> Right ("typechecked module" |
210 | , simpleShow $ vcat $ "------------ desugared source code": map pShow desug ++ | 210 | , simpleShow $ vcat $ e: "------------ desugared source code": intersperse "" (map pShow desug) ++ |
211 | e: listAllInfos i) | 211 | listAllInfos i) |
212 | Right (fname, Right (e, te)) | 212 | Right (fname, Right (e, te)) |
213 | | te == outputType -> Right ("compiled pipeline", prettyShowUnlines $ compilePipeline OpenGL33 (e, te)) | 213 | | te == outputType -> Right ("compiled pipeline", prettyShowUnlines $ compilePipeline OpenGL33 (e, te)) |
214 | | e == trueExp -> Right ("reducted main", simpleShow $ unfixlabel e) | 214 | | e == trueExp -> Right ("reducted main", simpleShow $ unfixlabel e) |
diff --git a/testdata/Builtins.out b/testdata/Builtins.out index ffe2badf..7087ba31 100644 --- a/testdata/Builtins.out +++ b/testdata/Builtins.out | |||
@@ -1,9 +1,12 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | id = \(a :: _) -> _rhs a | 3 | id = \(a :: _) -> _rhs a |
4 | |||
3 | data VecS (_ :: Type) :: Nat -> Type where | 5 | data VecS (_ :: Type) :: Nat -> Type where |
4 | V2 :: forall a . a -> a -> VecS a (fromInt 2) | 6 | V2 :: forall a . a -> a -> VecS a (fromInt 2) |
5 | V3 :: forall b . b -> b -> b -> VecS b (fromInt 3) | 7 | V3 :: forall b . b -> b -> b -> VecS b (fromInt 3) |
6 | V4 :: forall c . c -> c -> c -> c -> VecS c (fromInt 4) | 8 | V4 :: forall c . c -> c -> c -> c -> VecS c (fromInt 4) |
9 | |||
7 | mapVec :: forall (a :: _) (b :: _) (c :: _) . (a -> b) -> VecS a c -> VecS b c | 10 | mapVec :: forall (a :: _) (b :: _) (c :: _) . (a -> b) -> VecS a c -> VecS b c |
8 | mapVec | 11 | mapVec |
9 | = \(a :: _) (b :: _) -> case'VecS | 12 | = \(a :: _) (b :: _) -> case'VecS |
@@ -12,8 +15,10 @@ mapVec | |||
12 | (\(e :: _) (f :: _) (g :: _) -> _rhs (V3 (a e) (a f) (a g))) | 15 | (\(e :: _) (f :: _) (g :: _) -> _rhs (V3 (a e) (a f) (a g))) |
13 | (\(h :: _) (i :: _) (j :: _) (k :: _) -> _rhs (V4 (a h) (a i) (a j) (a k))) | 16 | (\(h :: _) (i :: _) (j :: _) (k :: _) -> _rhs (V4 (a h) (a i) (a j) (a k))) |
14 | b | 17 | b |
18 | |||
15 | 'Vec :: Nat -> Type -> Type | 19 | 'Vec :: Nat -> Type -> Type |
16 | 'Vec = \(a :: _) (b :: _) -> _rhs ('VecS b a) | 20 | 'Vec = \(a :: _) (b :: _) -> _rhs ('VecS b a) |
21 | |||
17 | 'VecScalar :: Nat -> Type -> Type | 22 | 'VecScalar :: Nat -> Type -> Type |
18 | 'VecScalar | 23 | 'VecScalar |
19 | = \(a :: _) (b :: _) -> case'Nat | 24 | = \(a :: _) (b :: _) -> case'Nat |
@@ -25,6 +30,7 @@ mapVec | |||
25 | (\(d :: _) -> _rhs ('Vec (Succ (Succ d)) b)) | 30 | (\(d :: _) -> _rhs ('Vec (Succ (Succ d)) b)) |
26 | c) | 31 | c) |
27 | a | 32 | a |
33 | |||
28 | data Mat :: Nat -> Nat -> Type -> Type where | 34 | data Mat :: Nat -> Nat -> Type -> Type where |
29 | M22F | 35 | M22F |
30 | :: Vec (fromInt 2) Float | 36 | :: Vec (fromInt 2) Float |
@@ -62,6 +68,7 @@ data Mat :: Nat -> Nat -> Type -> Type where | |||
62 | -> Vec (fromInt 4) Float | 68 | -> Vec (fromInt 4) Float |
63 | -> Vec (fromInt 4) Float | 69 | -> Vec (fromInt 4) Float |
64 | -> Vec (fromInt 4) Float -> Mat (fromInt 4) (fromInt 4) Float | 70 | -> Vec (fromInt 4) Float -> Mat (fromInt 4) (fromInt 4) Float |
71 | |||
65 | 'MatVecScalarElem :: Type -> Type | 72 | 'MatVecScalarElem :: Type -> Type |
66 | 'MatVecScalarElem | 73 | 'MatVecScalarElem |
67 | = \(a :: _) -> match'Float | 74 | = \(a :: _) -> match'Float |
@@ -81,6 +88,7 @@ data Mat :: Nat -> Nat -> Type -> Type where | |||
81 | (\(b :: _) _ -> _rhs b) | 88 | (\(b :: _) _ -> _rhs b) |
82 | a | 89 | a |
83 | (match'Mat (\_ -> _) (\_ _ (c :: _) -> _rhs c) a undefined)))) | 90 | (match'Mat (\_ -> _) (\_ _ (c :: _) -> _rhs c) a undefined)))) |
91 | |||
84 | 'Signed :: Type -> Type | 92 | 'Signed :: Type -> Type |
85 | 'Signed | 93 | 'Signed |
86 | = \(a :: _) -> match'Int | 94 | = \(a :: _) -> match'Int |
@@ -92,6 +100,7 @@ data Mat :: Nat -> Nat -> Type -> Type where | |||
92 | (_rhs 'Unit) | 100 | (_rhs 'Unit) |
93 | a | 101 | a |
94 | (_rhs ('Empty "no instance of 'Signed on ???"))) | 102 | (_rhs ('Empty "no instance of 'Signed on ???"))) |
103 | |||
95 | 'Component :: Type -> Type | 104 | 'Component :: Type -> Type |
96 | 'Component | 105 | 'Component |
97 | = \(a :: _) -> match'Int | 106 | = \(a :: _) -> match'Int |
@@ -163,6 +172,7 @@ data Mat :: Nat -> Nat -> Type -> Type where | |||
163 | (_rhs 'Unit) | 172 | (_rhs 'Unit) |
164 | a | 173 | a |
165 | (_rhs ('Empty "no instance of 'Component on ???")))))) | 174 | (_rhs ('Empty "no instance of 'Component on ???")))))) |
175 | |||
166 | zero :: forall a . Component a => a | 176 | zero :: forall a . Component a => a |
167 | zero | 177 | zero |
168 | = \ @a @_ -> match'Int | 178 | = \ @a @_ -> match'Int |
@@ -230,6 +240,7 @@ zero | |||
230 | (_rhs undefined))) | 240 | (_rhs undefined))) |
231 | a | 241 | a |
232 | (match'Bool (\_ -> _) (_rhs \(u := _rhs False) -> u) a (_rhs undefined))))) | 242 | (match'Bool (\_ -> _) (_rhs \(u := _rhs False) -> u) a (_rhs undefined))))) |
243 | |||
233 | one :: forall a . Component a => a | 244 | one :: forall a . Component a => a |
234 | one | 245 | one |
235 | = \ @a @_ -> match'Int | 246 | = \ @a @_ -> match'Int |
@@ -297,6 +308,7 @@ one | |||
297 | (_rhs undefined))) | 308 | (_rhs undefined))) |
298 | a | 309 | a |
299 | (match'Bool (\_ -> _) (_rhs \(u := _rhs True) -> u) a (_rhs undefined))))) | 310 | (match'Bool (\_ -> _) (_rhs \(u := _rhs True) -> u) a (_rhs undefined))))) |
311 | |||
300 | 'Integral :: Type -> Type | 312 | 'Integral :: Type -> Type |
301 | 'Integral | 313 | 'Integral |
302 | = \(a :: _) -> match'Int | 314 | = \(a :: _) -> match'Int |
@@ -308,6 +320,7 @@ one | |||
308 | (_rhs 'Unit) | 320 | (_rhs 'Unit) |
309 | a | 321 | a |
310 | (_rhs ('Empty "no instance of 'Integral on ???"))) | 322 | (_rhs ('Empty "no instance of 'Integral on ???"))) |
323 | |||
311 | 'Floating :: Type -> Type | 324 | 'Floating :: Type -> Type |
312 | 'Floating | 325 | 'Floating |
313 | = \(a :: _) -> match'Float | 326 | = \(a :: _) -> match'Float |
@@ -463,282 +476,422 @@ one | |||
463 | h) | 476 | h) |
464 | a | 477 | a |
465 | (_rhs ('Empty "no instance of 'Floating on ???")))) | 478 | (_rhs ('Empty "no instance of 'Floating on ???")))) |
479 | |||
466 | PrimAdd :: forall (a :: _) . Num (MatVecScalarElem a) => a -> a -> a | 480 | PrimAdd :: forall (a :: _) . Num (MatVecScalarElem a) => a -> a -> a |
481 | |||
467 | PrimSub :: forall (a :: _) . Num (MatVecScalarElem a) => a -> a -> a | 482 | PrimSub :: forall (a :: _) . Num (MatVecScalarElem a) => a -> a -> a |
483 | |||
468 | PrimMul :: forall (a :: _) . Num (MatVecScalarElem a) => a -> a -> a | 484 | PrimMul :: forall (a :: _) . Num (MatVecScalarElem a) => a -> a -> a |
485 | |||
469 | PrimAddS | 486 | PrimAddS |
470 | :: forall (a :: _) (b :: _) . (a ~ MatVecScalarElem b, Num a) => b -> a -> b | 487 | :: forall (a :: _) (b :: _) . (a ~ MatVecScalarElem b, Num a) => b -> a -> b |
488 | |||
471 | PrimSubS | 489 | PrimSubS |
472 | :: forall (a :: _) (b :: _) . (a ~ MatVecScalarElem b, Num a) => b -> a -> b | 490 | :: forall (a :: _) (b :: _) . (a ~ MatVecScalarElem b, Num a) => b -> a -> b |
491 | |||
473 | PrimMulS | 492 | PrimMulS |
474 | :: forall (a :: _) (b :: _) . (a ~ MatVecScalarElem b, Num a) => b -> a -> b | 493 | :: forall (a :: _) (b :: _) . (a ~ MatVecScalarElem b, Num a) => b -> a -> b |
494 | |||
475 | PrimDiv | 495 | PrimDiv |
476 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> b -> b | 496 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> b -> b |
497 | |||
477 | PrimMod | 498 | PrimMod |
478 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> b -> b | 499 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> b -> b |
500 | |||
479 | PrimDivS | 501 | PrimDivS |
480 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> a -> b | 502 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> a -> b |
503 | |||
481 | PrimModS | 504 | PrimModS |
482 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> a -> b | 505 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> a -> b |
506 | |||
483 | PrimNeg :: forall (a :: _) . Signed (MatVecScalarElem a) => a -> a | 507 | PrimNeg :: forall (a :: _) . Signed (MatVecScalarElem a) => a -> a |
508 | |||
484 | PrimBAnd | 509 | PrimBAnd |
485 | :: forall (a :: _) (b :: _) (c :: _) | 510 | :: forall (a :: _) (b :: _) (c :: _) |
486 | . (Integral a, b ~ VecScalar c a) => b -> b -> b | 511 | . (Integral a, b ~ VecScalar c a) => b -> b -> b |
512 | |||
487 | PrimBOr | 513 | PrimBOr |
488 | :: forall (a :: _) (b :: _) (c :: _) | 514 | :: forall (a :: _) (b :: _) (c :: _) |
489 | . (Integral a, b ~ VecScalar c a) => b -> b -> b | 515 | . (Integral a, b ~ VecScalar c a) => b -> b -> b |
516 | |||
490 | PrimBXor | 517 | PrimBXor |
491 | :: forall (a :: _) (b :: _) (c :: _) | 518 | :: forall (a :: _) (b :: _) (c :: _) |
492 | . (Integral a, b ~ VecScalar c a) => b -> b -> b | 519 | . (Integral a, b ~ VecScalar c a) => b -> b -> b |
520 | |||
493 | PrimBAndS | 521 | PrimBAndS |
494 | :: forall (a :: _) (b :: _) (c :: _) | 522 | :: forall (a :: _) (b :: _) (c :: _) |
495 | . (Integral a, b ~ VecScalar c a) => b -> a -> b | 523 | . (Integral a, b ~ VecScalar c a) => b -> a -> b |
524 | |||
496 | PrimBOrS | 525 | PrimBOrS |
497 | :: forall (a :: _) (b :: _) (c :: _) | 526 | :: forall (a :: _) (b :: _) (c :: _) |
498 | . (Integral a, b ~ VecScalar c a) => b -> a -> b | 527 | . (Integral a, b ~ VecScalar c a) => b -> a -> b |
528 | |||
499 | PrimBXorS | 529 | PrimBXorS |
500 | :: forall (a :: _) (b :: _) (c :: _) | 530 | :: forall (a :: _) (b :: _) (c :: _) |
501 | . (Integral a, b ~ VecScalar c a) => b -> a -> b | 531 | . (Integral a, b ~ VecScalar c a) => b -> a -> b |
532 | |||
502 | PrimBNot | 533 | PrimBNot |
503 | :: forall (a :: _) (b :: _) (c :: _) . (Integral a, b ~ VecScalar c a) => b -> b | 534 | :: forall (a :: _) (b :: _) (c :: _) . (Integral a, b ~ VecScalar c a) => b -> b |
535 | |||
504 | PrimBShiftL | 536 | PrimBShiftL |
505 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) | 537 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) |
506 | . (Integral a, b ~ VecScalar c a, d ~ VecScalar c Word) => b -> d -> b | 538 | . (Integral a, b ~ VecScalar c a, d ~ VecScalar c Word) => b -> d -> b |
539 | |||
507 | PrimBShiftR | 540 | PrimBShiftR |
508 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) | 541 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) |
509 | . (Integral a, b ~ VecScalar c a, d ~ VecScalar c Word) => b -> d -> b | 542 | . (Integral a, b ~ VecScalar c a, d ~ VecScalar c Word) => b -> d -> b |
543 | |||
510 | PrimBShiftLS | 544 | PrimBShiftLS |
511 | :: forall (a :: _) (b :: _) (c :: _) | 545 | :: forall (a :: _) (b :: _) (c :: _) |
512 | . (Integral a, b ~ VecScalar c a) => b -> Word -> b | 546 | . (Integral a, b ~ VecScalar c a) => b -> Word -> b |
547 | |||
513 | PrimBShiftRS | 548 | PrimBShiftRS |
514 | :: forall (a :: _) (b :: _) (c :: _) | 549 | :: forall (a :: _) (b :: _) (c :: _) |
515 | . (Integral a, b ~ VecScalar c a) => b -> Word -> b | 550 | . (Integral a, b ~ VecScalar c a) => b -> Word -> b |
551 | |||
516 | PrimAnd :: Bool -> Bool -> Bool | 552 | PrimAnd :: Bool -> Bool -> Bool |
553 | |||
517 | PrimOr :: Bool -> Bool -> Bool | 554 | PrimOr :: Bool -> Bool -> Bool |
555 | |||
518 | PrimXor :: Bool -> Bool -> Bool | 556 | PrimXor :: Bool -> Bool -> Bool |
557 | |||
519 | PrimNot :: forall (a :: _) (b :: _) . (a ~ VecScalar b Bool) => a -> a | 558 | PrimNot :: forall (a :: _) (b :: _) . (a ~ VecScalar b Bool) => a -> a |
559 | |||
520 | PrimAny :: forall (a :: _) . VecScalar a Bool -> Bool | 560 | PrimAny :: forall (a :: _) . VecScalar a Bool -> Bool |
561 | |||
521 | PrimAll :: forall (a :: _) . VecScalar a Bool -> Bool | 562 | PrimAll :: forall (a :: _) . VecScalar a Bool -> Bool |
563 | |||
522 | PrimACos :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 564 | PrimACos :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
565 | |||
523 | PrimACosH :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 566 | PrimACosH :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
567 | |||
524 | PrimASin :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 568 | PrimASin :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
569 | |||
525 | PrimASinH :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 570 | PrimASinH :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
571 | |||
526 | PrimATan :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 572 | PrimATan :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
573 | |||
527 | PrimATanH :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 574 | PrimATanH :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
575 | |||
528 | PrimCos :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 576 | PrimCos :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
577 | |||
529 | PrimCosH :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 578 | PrimCosH :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
579 | |||
530 | PrimDegrees :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 580 | PrimDegrees :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
581 | |||
531 | PrimRadians :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 582 | PrimRadians :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
583 | |||
532 | PrimSin :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 584 | PrimSin :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
585 | |||
533 | PrimSinH :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 586 | PrimSinH :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
587 | |||
534 | PrimTan :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 588 | PrimTan :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
589 | |||
535 | PrimTanH :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 590 | PrimTanH :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
591 | |||
536 | PrimExp :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 592 | PrimExp :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
593 | |||
537 | PrimLog :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 594 | PrimLog :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
595 | |||
538 | PrimExp2 :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 596 | PrimExp2 :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
597 | |||
539 | PrimLog2 :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 598 | PrimLog2 :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
599 | |||
540 | PrimSqrt :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 600 | PrimSqrt :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
601 | |||
541 | PrimInvSqrt :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 602 | PrimInvSqrt :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
603 | |||
542 | PrimPow :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> a | 604 | PrimPow :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> a |
605 | |||
543 | PrimATan2 :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> a | 606 | PrimATan2 :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> a |
607 | |||
544 | PrimFloor :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 608 | PrimFloor :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
609 | |||
545 | PrimTrunc :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 610 | PrimTrunc :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
611 | |||
546 | PrimRound :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 612 | PrimRound :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
613 | |||
547 | PrimRoundEven :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 614 | PrimRoundEven :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
615 | |||
548 | PrimCeil :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 616 | PrimCeil :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
617 | |||
549 | PrimFract :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 618 | PrimFract :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
619 | |||
550 | PrimMin | 620 | PrimMin |
551 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> b -> b | 621 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> b -> b |
622 | |||
552 | PrimMax | 623 | PrimMax |
553 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> b -> b | 624 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> b -> b |
625 | |||
554 | PrimMinS | 626 | PrimMinS |
555 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> a -> b | 627 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> a -> b |
628 | |||
556 | PrimMaxS | 629 | PrimMaxS |
557 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> a -> b | 630 | :: forall (a :: _) (b :: _) (c :: _) . (Num a, b ~ VecScalar c a) => b -> a -> b |
631 | |||
558 | PrimIsNan | 632 | PrimIsNan |
559 | :: forall (a :: _) (b :: _) (c :: _) | 633 | :: forall (a :: _) (b :: _) (c :: _) |
560 | . (a ~ VecScalar b Float, c ~ VecScalar b Bool) => a -> c | 634 | . (a ~ VecScalar b Float, c ~ VecScalar b Bool) => a -> c |
635 | |||
561 | PrimIsInf | 636 | PrimIsInf |
562 | :: forall (a :: _) (b :: _) (c :: _) | 637 | :: forall (a :: _) (b :: _) (c :: _) |
563 | . (a ~ VecScalar b Float, c ~ VecScalar b Bool) => a -> c | 638 | . (a ~ VecScalar b Float, c ~ VecScalar b Bool) => a -> c |
639 | |||
564 | PrimAbs | 640 | PrimAbs |
565 | :: forall (a :: _) (b :: _) (c :: _) . (Signed a, b ~ VecScalar c a) => b -> b | 641 | :: forall (a :: _) (b :: _) (c :: _) . (Signed a, b ~ VecScalar c a) => b -> b |
642 | |||
566 | PrimSign | 643 | PrimSign |
567 | :: forall (a :: _) (b :: _) (c :: _) . (Signed a, b ~ VecScalar c a) => b -> b | 644 | :: forall (a :: _) (b :: _) (c :: _) . (Signed a, b ~ VecScalar c a) => b -> b |
645 | |||
568 | PrimModF | 646 | PrimModF |
569 | :: forall (a :: _) (b :: _) | 647 | :: forall (a :: _) (b :: _) |
570 | . (a ~ VecScalar b Float) => a -> HList (a : a : '[]) | 648 | . (a ~ VecScalar b Float) => a -> HList (a : a : '[]) |
649 | |||
571 | PrimClamp | 650 | PrimClamp |
572 | :: forall (a :: _) (b :: _) (c :: _) | 651 | :: forall (a :: _) (b :: _) (c :: _) |
573 | . (Num a, b ~ VecScalar c a) => b -> b -> b -> b | 652 | . (Num a, b ~ VecScalar c a) => b -> b -> b -> b |
653 | |||
574 | PrimClampS | 654 | PrimClampS |
575 | :: forall (a :: _) (b :: _) (c :: _) | 655 | :: forall (a :: _) (b :: _) (c :: _) |
576 | . (Num a, b ~ VecScalar c a) => b -> a -> a -> b | 656 | . (Num a, b ~ VecScalar c a) => b -> a -> a -> b |
657 | |||
577 | PrimMix | 658 | PrimMix |
578 | :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> a -> a | 659 | :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> a -> a |
660 | |||
579 | PrimMixS | 661 | PrimMixS |
580 | :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> Float -> a | 662 | :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> Float -> a |
663 | |||
581 | PrimMixB | 664 | PrimMixB |
582 | :: forall (a :: _) (b :: _) (c :: _) | 665 | :: forall (a :: _) (b :: _) (c :: _) |
583 | . (a ~ VecScalar b Float, c ~ VecScalar b Bool) => a -> a -> c -> a | 666 | . (a ~ VecScalar b Float, c ~ VecScalar b Bool) => a -> a -> c -> a |
667 | |||
584 | PrimStep :: forall (a :: _) (b :: _) . (a ~ Vec b Float) => a -> a -> a | 668 | PrimStep :: forall (a :: _) (b :: _) . (a ~ Vec b Float) => a -> a -> a |
669 | |||
585 | PrimStepS | 670 | PrimStepS |
586 | :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => Float -> a -> a | 671 | :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => Float -> a -> a |
672 | |||
587 | PrimSmoothStep | 673 | PrimSmoothStep |
588 | :: forall (a :: _) (b :: _) . (a ~ Vec b Float) => a -> a -> a -> a | 674 | :: forall (a :: _) (b :: _) . (a ~ Vec b Float) => a -> a -> a -> a |
675 | |||
589 | PrimSmoothStepS | 676 | PrimSmoothStepS |
590 | :: forall (a :: _) (b :: _) | 677 | :: forall (a :: _) (b :: _) |
591 | . (a ~ VecScalar b Float) => Float -> Float -> a -> a | 678 | . (a ~ VecScalar b Float) => Float -> Float -> a -> a |
679 | |||
592 | PrimFloatBitsToInt :: forall (a :: _) . VecScalar a Float -> VecScalar a Int | 680 | PrimFloatBitsToInt :: forall (a :: _) . VecScalar a Float -> VecScalar a Int |
681 | |||
593 | PrimFloatBitsToUInt :: forall (a :: _) . VecScalar a Float -> VecScalar a Word | 682 | PrimFloatBitsToUInt :: forall (a :: _) . VecScalar a Float -> VecScalar a Word |
683 | |||
594 | PrimIntBitsToFloat :: forall (a :: _) . VecScalar a Int -> VecScalar a Float | 684 | PrimIntBitsToFloat :: forall (a :: _) . VecScalar a Int -> VecScalar a Float |
685 | |||
595 | PrimUIntBitsToFloat :: forall (a :: _) . VecScalar a Word -> VecScalar a Float | 686 | PrimUIntBitsToFloat :: forall (a :: _) . VecScalar a Word -> VecScalar a Float |
687 | |||
596 | PrimLength :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> Float | 688 | PrimLength :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> Float |
689 | |||
597 | PrimDistance | 690 | PrimDistance |
598 | :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> Float | 691 | :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> Float |
692 | |||
599 | PrimDot :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> Float | 693 | PrimDot :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> Float |
694 | |||
600 | PrimCross :: forall (a :: _) . (a ~ VecScalar (fromInt 3) Float) => a -> a -> a | 695 | PrimCross :: forall (a :: _) . (a ~ VecScalar (fromInt 3) Float) => a -> a -> a |
696 | |||
601 | PrimNormalize :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 697 | PrimNormalize :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
698 | |||
602 | PrimFaceForward | 699 | PrimFaceForward |
603 | :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> a -> a | 700 | :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> a -> a |
701 | |||
604 | PrimRefract | 702 | PrimRefract |
605 | :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> a -> a | 703 | :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> a -> a |
704 | |||
606 | PrimReflect :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> a | 705 | PrimReflect :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a -> a |
706 | |||
607 | PrimTranspose :: forall (a :: _) (b :: _) (c :: _) . Mat a b c -> Mat b a c | 707 | PrimTranspose :: forall (a :: _) (b :: _) (c :: _) . Mat a b c -> Mat b a c |
708 | |||
608 | PrimDeterminant :: forall (a :: _) (b :: _) . Mat a a b -> Float | 709 | PrimDeterminant :: forall (a :: _) (b :: _) . Mat a a b -> Float |
710 | |||
609 | PrimInverse :: forall (a :: _) (b :: _) . Mat a a b -> Mat a a b | 711 | PrimInverse :: forall (a :: _) (b :: _) . Mat a a b -> Mat a a b |
712 | |||
610 | PrimOuterProduct | 713 | PrimOuterProduct |
611 | :: forall (a :: _) (b :: _) (c :: _) . Vec a b -> Vec c b -> Mat c a b | 714 | :: forall (a :: _) (b :: _) (c :: _) . Vec a b -> Vec c b -> Mat c a b |
715 | |||
612 | PrimMulMatVec | 716 | PrimMulMatVec |
613 | :: forall (a :: _) (b :: _) (c :: _) . Mat a b c -> Vec b c -> Vec a c | 717 | :: forall (a :: _) (b :: _) (c :: _) . Mat a b c -> Vec b c -> Vec a c |
718 | |||
614 | PrimMulVecMat | 719 | PrimMulVecMat |
615 | :: forall (a :: _) (b :: _) (c :: _) . Vec a b -> Mat a c b -> Vec c b | 720 | :: forall (a :: _) (b :: _) (c :: _) . Vec a b -> Mat a c b -> Vec c b |
721 | |||
616 | PrimMulMatMat | 722 | PrimMulMatMat |
617 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) | 723 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) |
618 | . Mat a b c -> Mat b d c -> Mat a d c | 724 | . Mat a b c -> Mat b d c -> Mat a d c |
725 | |||
619 | PrimLessThan | 726 | PrimLessThan |
620 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) | 727 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) |
621 | . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d | 728 | . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d |
729 | |||
622 | PrimLessThanEqual | 730 | PrimLessThanEqual |
623 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) | 731 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) |
624 | . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d | 732 | . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d |
733 | |||
625 | PrimGreaterThan | 734 | PrimGreaterThan |
626 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) | 735 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) |
627 | . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d | 736 | . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d |
737 | |||
628 | PrimGreaterThanEqual | 738 | PrimGreaterThanEqual |
629 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) | 739 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) |
630 | . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d | 740 | . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d |
741 | |||
631 | PrimEqualV | 742 | PrimEqualV |
632 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) | 743 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) |
633 | . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d | 744 | . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d |
745 | |||
634 | PrimNotEqualV | 746 | PrimNotEqualV |
635 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) | 747 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) |
636 | . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d | 748 | . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d |
749 | |||
637 | PrimEqual | 750 | PrimEqual |
638 | :: forall (a :: _) (b :: _) . (b ~ MatVecScalarElem a) => a -> a -> Bool | 751 | :: forall (a :: _) (b :: _) . (b ~ MatVecScalarElem a) => a -> a -> Bool |
752 | |||
639 | PrimNotEqual | 753 | PrimNotEqual |
640 | :: forall (a :: _) (b :: _) . (b ~ MatVecScalarElem a) => a -> a -> Bool | 754 | :: forall (a :: _) (b :: _) . (b ~ MatVecScalarElem a) => a -> a -> Bool |
755 | |||
641 | PrimDFdx :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 756 | PrimDFdx :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
757 | |||
642 | PrimDFdy :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 758 | PrimDFdy :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
759 | |||
643 | PrimFWidth :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a | 760 | PrimFWidth :: forall (a :: _) (b :: _) . (a ~ VecScalar b Float) => a -> a |
761 | |||
644 | PrimNoise1 :: forall (a :: _) . VecScalar a Float -> Float | 762 | PrimNoise1 :: forall (a :: _) . VecScalar a Float -> Float |
763 | |||
645 | PrimNoise2 :: forall (a :: _) . VecScalar a Float -> Vec (fromInt 2) Float | 764 | PrimNoise2 :: forall (a :: _) . VecScalar a Float -> Vec (fromInt 2) Float |
765 | |||
646 | PrimNoise3 :: forall (a :: _) . VecScalar a Float -> Vec (fromInt 3) Float | 766 | PrimNoise3 :: forall (a :: _) . VecScalar a Float -> Vec (fromInt 3) Float |
767 | |||
647 | PrimNoise4 :: forall (a :: _) . VecScalar a Float -> Vec (fromInt 4) Float | 768 | PrimNoise4 :: forall (a :: _) . VecScalar a Float -> Vec (fromInt 4) Float |
769 | |||
648 | head | 770 | head |
649 | = \(a :: _) -> case'List (\_ -> _) (_rhs undefined) (\(b :: _) _ -> _rhs b) a | 771 | = \(a :: _) -> case'List (\_ -> _) (_rhs undefined) (\(b :: _) _ -> _rhs b) a |
772 | |||
650 | (++) | 773 | (++) |
651 | = \(a :: _) (b :: _) -> case'List | 774 | = \(a :: _) (b :: _) -> case'List |
652 | (\_ -> _) | 775 | (\_ -> _) |
653 | (_rhs b) | 776 | (_rhs b) |
654 | (\(c :: _) (d :: _) -> _rhs (c : d ++ b)) | 777 | (\(c :: _) (d :: _) -> _rhs (c : d ++ b)) |
655 | a | 778 | a |
779 | |||
656 | foldr | 780 | foldr |
657 | = \(a :: _) (b :: _) (c :: _) -> case'List | 781 | = \(a :: _) (b :: _) (c :: _) -> case'List |
658 | (\_ -> _) | 782 | (\_ -> _) |
659 | (_rhs b) | 783 | (_rhs b) |
660 | (\(d :: _) (e :: _) -> _rhs (a d (foldr a b e))) | 784 | (\(d :: _) (e :: _) -> _rhs (a d (foldr a b e))) |
661 | c | 785 | c |
786 | |||
662 | concat = _rhs (foldr (++) []) | 787 | concat = _rhs (foldr (++) []) |
788 | |||
663 | map | 789 | map |
664 | = \(a :: _) (b :: _) -> case'List | 790 | = \(a :: _) (b :: _) -> case'List |
665 | (\_ -> _) | 791 | (\_ -> _) |
666 | (_rhs []) | 792 | (_rhs []) |
667 | (\(c :: _) (d :: _) -> _rhs (a c : map a d)) | 793 | (\(c :: _) (d :: _) -> _rhs (a c : map a d)) |
668 | b | 794 | b |
795 | |||
669 | concatMap :: forall (a :: _) (b :: _) . (a -> [b]) -> [a] -> [b] | 796 | concatMap :: forall (a :: _) (b :: _) . (a -> [b]) -> [a] -> [b] |
670 | concatMap = \(a :: _) (b :: _) -> _rhs (concat (map a b)) | 797 | concatMap = \(a :: _) (b :: _) -> _rhs (concat (map a b)) |
798 | |||
671 | len | 799 | len |
672 | = \(a :: _) -> case'List | 800 | = \(a :: _) -> case'List |
673 | (\_ -> _) | 801 | (\_ -> _) |
674 | (_rhs (fromInt 0)) | 802 | (_rhs (fromInt 0)) |
675 | (\_ (b :: _) -> _rhs (fromInt 1 `primAddInt` len b)) | 803 | (\_ (b :: _) -> _rhs (fromInt 1 `primAddInt` len b)) |
676 | a | 804 | a |
805 | |||
677 | data Maybe (_ :: Type) :: Type where | 806 | data Maybe (_ :: Type) :: Type where |
678 | Nothing :: forall a . Maybe a | 807 | Nothing :: forall a . Maybe a |
679 | Just :: forall b . b -> Maybe b | 808 | Just :: forall b . b -> Maybe b |
809 | |||
680 | data Vector (_ :: Nat) (_ :: Type) :: Type where | 810 | data Vector (_ :: Nat) (_ :: Type) :: Type where |
681 | 811 | ||
812 | |||
682 | data PrimitiveType :: Type where | 813 | data PrimitiveType :: Type where |
683 | Triangle :: PrimitiveType | 814 | Triangle :: PrimitiveType |
684 | Line :: PrimitiveType | 815 | Line :: PrimitiveType |
685 | Point :: PrimitiveType | 816 | Point :: PrimitiveType |
686 | TriangleAdjacency :: PrimitiveType | 817 | TriangleAdjacency :: PrimitiveType |
687 | LineAdjacency :: PrimitiveType | 818 | LineAdjacency :: PrimitiveType |
819 | |||
688 | data Primitive (_ :: Type) :: PrimitiveType -> Type where | 820 | data Primitive (_ :: Type) :: PrimitiveType -> Type where |
689 | PrimPoint :: forall a . a -> Primitive a Point | 821 | PrimPoint :: forall a . a -> Primitive a Point |
690 | PrimLine :: forall b . b -> b -> Primitive b Line | 822 | PrimLine :: forall b . b -> b -> Primitive b Line |
691 | PrimTriangle :: forall c . c -> c -> c -> Primitive c Triangle | 823 | PrimTriangle :: forall c . c -> c -> c -> Primitive c Triangle |
824 | |||
692 | mapPrimitive | 825 | mapPrimitive |
693 | :: forall (a :: _) (b :: _) (c :: _) | 826 | :: forall (a :: _) (b :: _) (c :: _) |
694 | . (a -> b) -> Primitive a c -> Primitive b c | 827 | . (a -> b) -> Primitive a c -> Primitive b c |
828 | |||
695 | 'PrimitiveStream = \(a :: _) (b :: _) -> _rhs ['Primitive b a] | 829 | 'PrimitiveStream = \(a :: _) (b :: _) -> _rhs ['Primitive b a] |
830 | |||
696 | mapPrimitives | 831 | mapPrimitives |
697 | :: forall (a :: _) (b :: _) (c :: _) | 832 | :: forall (a :: _) (b :: _) (c :: _) |
698 | . (a -> b) -> PrimitiveStream c a -> PrimitiveStream c b | 833 | . (a -> b) -> PrimitiveStream c a -> PrimitiveStream c b |
699 | mapPrimitives = \(a :: _) -> _rhs (map (mapPrimitive a)) | 834 | mapPrimitives = \(a :: _) -> _rhs (map (mapPrimitive a)) |
835 | |||
700 | 'ListElem :: Type -> Type | 836 | 'ListElem :: Type -> Type |
701 | 'ListElem = \(a :: _) -> match'List (\_ -> _) (\(b :: _) -> _rhs b) a undefined | 837 | 'ListElem = \(a :: _) -> match'List (\_ -> _) (\(b :: _) -> _rhs b) a undefined |
838 | |||
702 | fetchArrays | 839 | fetchArrays |
703 | :: forall (a :: _) (b :: _) (c :: _) | 840 | :: forall (a :: _) (b :: _) (c :: _) |
704 | . (b ~ map ListElem c) => HList c -> PrimitiveStream a (HList b) | 841 | . (b ~ map ListElem c) => HList c -> PrimitiveStream a (HList b) |
842 | |||
705 | fetch | 843 | fetch |
706 | :: forall (a :: _) (b :: _) . String -> HList b -> PrimitiveStream a (HList b) | 844 | :: forall (a :: _) (b :: _) . String -> HList b -> PrimitiveStream a (HList b) |
845 | |||
707 | Attribute :: forall (a :: _) . String -> a | 846 | Attribute :: forall (a :: _) . String -> a |
847 | |||
708 | fetchStream | 848 | fetchStream |
709 | :: forall (a :: _) (b :: [Type]) | 849 | :: forall (a :: _) (b :: [Type]) |
710 | . String | 850 | . String |
711 | -> forall (c :: [String]) -> (len c ~ len b) => PrimitiveStream a (HList b) | 851 | -> forall (c :: [String]) -> (len c ~ len b) => PrimitiveStream a (HList b) |
852 | |||
712 | data SimpleFragment (_ :: Type) :: Type where | 853 | data SimpleFragment (_ :: Type) :: Type where |
713 | SimpleFragment :: forall a . Vec (fromInt 3) Float -> a -> SimpleFragment a | 854 | SimpleFragment :: forall a . Vec (fromInt 3) Float -> a -> SimpleFragment a |
855 | |||
714 | 'Fragment = \(a :: _) (b :: _) -> _rhs ('Vector a ('Maybe ('SimpleFragment b))) | 856 | 'Fragment = \(a :: _) (b :: _) -> _rhs ('Vector a ('Maybe ('SimpleFragment b))) |
857 | |||
715 | sFragmentCoords | 858 | sFragmentCoords |
716 | = \(a :: _) -> case'SimpleFragment (\_ -> _) (\(b :: _) _ -> _rhs b) a | 859 | = \(a :: _) -> case'SimpleFragment (\_ -> _) (\(b :: _) _ -> _rhs b) a |
860 | |||
717 | sFragmentValue | 861 | sFragmentValue |
718 | = \(a :: _) -> case'SimpleFragment (\_ -> _) (\_ (b :: _) -> _rhs b) a | 862 | = \(a :: _) -> case'SimpleFragment (\_ -> _) (\_ (b :: _) -> _rhs b) a |
863 | |||
719 | 'FragmentStream = \(a :: _) (b :: _) -> _rhs ['Fragment a b] | 864 | 'FragmentStream = \(a :: _) (b :: _) -> _rhs ['Fragment a b] |
865 | |||
720 | customizeDepth | 866 | customizeDepth |
721 | :: forall (a :: _) (b :: _) . (a -> Float) -> Fragment b a -> Fragment b a | 867 | :: forall (a :: _) (b :: _) . (a -> Float) -> Fragment b a -> Fragment b a |
868 | |||
722 | customizeDepths | 869 | customizeDepths |
723 | :: forall (a :: _) (b :: _) | 870 | :: forall (a :: _) (b :: _) |
724 | . (a -> Float) -> FragmentStream b a -> FragmentStream b a | 871 | . (a -> Float) -> FragmentStream b a -> FragmentStream b a |
725 | customizeDepths = \(a :: _) -> _rhs (map (customizeDepth a)) | 872 | customizeDepths = \(a :: _) -> _rhs (map (customizeDepth a)) |
873 | |||
726 | filterFragment | 874 | filterFragment |
727 | :: forall (a :: _) (b :: _) . (a -> Bool) -> Fragment b a -> Fragment b a | 875 | :: forall (a :: _) (b :: _) . (a -> Bool) -> Fragment b a -> Fragment b a |
876 | |||
728 | filterFragments | 877 | filterFragments |
729 | :: forall (a :: _) (b :: _) | 878 | :: forall (a :: _) (b :: _) |
730 | . (a -> Bool) -> FragmentStream b a -> FragmentStream b a | 879 | . (a -> Bool) -> FragmentStream b a -> FragmentStream b a |
731 | filterFragments = \(a :: _) -> _rhs (map (filterFragment a)) | 880 | filterFragments = \(a :: _) -> _rhs (map (filterFragment a)) |
881 | |||
732 | mapFragment | 882 | mapFragment |
733 | :: forall (a :: _) (b :: _) (c :: _) . (a -> b) -> Fragment c a -> Fragment c b | 883 | :: forall (a :: _) (b :: _) (c :: _) . (a -> b) -> Fragment c a -> Fragment c b |
884 | |||
734 | mapFragments | 885 | mapFragments |
735 | :: forall (a :: _) (b :: _) (c :: _) | 886 | :: forall (a :: _) (b :: _) (c :: _) |
736 | . (a -> b) -> FragmentStream c a -> FragmentStream c b | 887 | . (a -> b) -> FragmentStream c a -> FragmentStream c b |
737 | mapFragments = \(a :: _) -> _rhs (map (mapFragment a)) | 888 | mapFragments = \(a :: _) -> _rhs (map (mapFragment a)) |
889 | |||
738 | data ImageKind :: Type where | 890 | data ImageKind :: Type where |
739 | Color :: Type -> ImageKind | 891 | Color :: Type -> ImageKind |
740 | Depth :: ImageKind | 892 | Depth :: ImageKind |
741 | Stencil :: ImageKind | 893 | Stencil :: ImageKind |
894 | |||
742 | imageType :: ImageKind -> Type | 895 | imageType :: ImageKind -> Type |
743 | imageType | 896 | imageType |
744 | = \(a :: _) -> case'ImageKind | 897 | = \(a :: _) -> case'ImageKind |
@@ -747,20 +900,28 @@ imageType | |||
747 | (_rhs 'Float) | 900 | (_rhs 'Float) |
748 | (_rhs 'Int) | 901 | (_rhs 'Int) |
749 | a | 902 | a |
903 | |||
750 | data Image (_ :: Nat) (_ :: ImageKind) :: Type where | 904 | data Image (_ :: Nat) (_ :: ImageKind) :: Type where |
751 | 905 | ||
906 | |||
752 | ColorImage | 907 | ColorImage |
753 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) | 908 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) |
754 | . (Num c, d ~ VecScalar b c) => d -> Image a (Color d) | 909 | . (Num c, d ~ VecScalar b c) => d -> Image a (Color d) |
910 | |||
755 | DepthImage :: forall (a :: _) . Float -> Image a Depth | 911 | DepthImage :: forall (a :: _) . Float -> Image a Depth |
912 | |||
756 | StencilImage :: forall (a :: _) . Int -> Image a Stencil | 913 | StencilImage :: forall (a :: _) . Int -> Image a Stencil |
914 | |||
757 | emptyDepthImage = _rhs (DepthImage @(fromInt 1)) | 915 | emptyDepthImage = _rhs (DepthImage @(fromInt 1)) |
916 | |||
758 | emptyColorImage = _rhs (ColorImage @(fromInt 1)) | 917 | emptyColorImage = _rhs (ColorImage @(fromInt 1)) |
918 | |||
759 | data Swizz :: Type where | 919 | data Swizz :: Type where |
760 | Sx :: Swizz | 920 | Sx :: Swizz |
761 | Sy :: Swizz | 921 | Sy :: Swizz |
762 | Sz :: Swizz | 922 | Sz :: Swizz |
763 | Sw :: Swizz | 923 | Sw :: Swizz |
924 | |||
764 | swizzscalar :: forall (a :: _) (b :: _) . Vec b a -> Swizz -> a | 925 | swizzscalar :: forall (a :: _) (b :: _) . Vec b a -> Swizz -> a |
765 | swizzscalar | 926 | swizzscalar |
766 | = \(a :: _) (b :: _) -> case'VecS | 927 | = \(a :: _) (b :: _) -> case'VecS |
@@ -787,6 +948,7 @@ swizzscalar | |||
787 | (_rhs k) | 948 | (_rhs k) |
788 | b) | 949 | b) |
789 | a | 950 | a |
951 | |||
790 | definedVec :: forall (a :: _) (b :: _) . Vec b a -> Bool | 952 | definedVec :: forall (a :: _) (b :: _) . Vec b a -> Bool |
791 | definedVec | 953 | definedVec |
792 | = \(a :: _) -> case'VecS | 954 | = \(a :: _) -> case'VecS |
@@ -795,6 +957,7 @@ definedVec | |||
795 | (\_ _ _ -> _rhs True) | 957 | (\_ _ _ -> _rhs True) |
796 | (\_ _ _ _ -> _rhs True) | 958 | (\_ _ _ _ -> _rhs True) |
797 | a | 959 | a |
960 | |||
798 | swizzvector | 961 | swizzvector |
799 | :: forall (a :: _) (b :: _) (c :: _) . Vec b a -> Vec c Swizz -> Vec c a | 962 | :: forall (a :: _) (b :: _) (c :: _) . Vec b a -> Vec c Swizz -> Vec c a |
800 | swizzvector | 963 | swizzvector |
@@ -803,6 +966,7 @@ swizzvector | |||
803 | (_rhs undefined) | 966 | (_rhs undefined) |
804 | (_rhs (mapVec (swizzscalar a) b)) | 967 | (_rhs (mapVec (swizzscalar a) b)) |
805 | (definedVec a) | 968 | (definedVec a) |
969 | |||
806 | data BlendingFactor :: Type where | 970 | data BlendingFactor :: Type where |
807 | ZeroBF :: BlendingFactor | 971 | ZeroBF :: BlendingFactor |
808 | OneBF :: BlendingFactor | 972 | OneBF :: BlendingFactor |
@@ -819,12 +983,14 @@ data BlendingFactor :: Type where | |||
819 | ConstantAlpha :: BlendingFactor | 983 | ConstantAlpha :: BlendingFactor |
820 | OneMinusConstantAlpha :: BlendingFactor | 984 | OneMinusConstantAlpha :: BlendingFactor |
821 | SrcAlphaSaturate :: BlendingFactor | 985 | SrcAlphaSaturate :: BlendingFactor |
986 | |||
822 | data BlendEquation :: Type where | 987 | data BlendEquation :: Type where |
823 | FuncAdd :: BlendEquation | 988 | FuncAdd :: BlendEquation |
824 | FuncSubtract :: BlendEquation | 989 | FuncSubtract :: BlendEquation |
825 | FuncReverseSubtract :: BlendEquation | 990 | FuncReverseSubtract :: BlendEquation |
826 | Min :: BlendEquation | 991 | Min :: BlendEquation |
827 | Max :: BlendEquation | 992 | Max :: BlendEquation |
993 | |||
828 | data LogicOperation :: Type where | 994 | data LogicOperation :: Type where |
829 | Clear :: LogicOperation | 995 | Clear :: LogicOperation |
830 | And :: LogicOperation | 996 | And :: LogicOperation |
@@ -842,6 +1008,7 @@ data LogicOperation :: Type where | |||
842 | OrInverted :: LogicOperation | 1008 | OrInverted :: LogicOperation |
843 | Nand :: LogicOperation | 1009 | Nand :: LogicOperation |
844 | Set :: LogicOperation | 1010 | Set :: LogicOperation |
1011 | |||
845 | data StencilOperation :: Type where | 1012 | data StencilOperation :: Type where |
846 | OpZero :: StencilOperation | 1013 | OpZero :: StencilOperation |
847 | OpKeep :: StencilOperation | 1014 | OpKeep :: StencilOperation |
@@ -851,6 +1018,7 @@ data StencilOperation :: Type where | |||
851 | OpDecr :: StencilOperation | 1018 | OpDecr :: StencilOperation |
852 | OpDecrWrap :: StencilOperation | 1019 | OpDecrWrap :: StencilOperation |
853 | OpInvert :: StencilOperation | 1020 | OpInvert :: StencilOperation |
1021 | |||
854 | data ComparisonFunction :: Type where | 1022 | data ComparisonFunction :: Type where |
855 | Never :: ComparisonFunction | 1023 | Never :: ComparisonFunction |
856 | Less :: ComparisonFunction | 1024 | Less :: ComparisonFunction |
@@ -860,28 +1028,37 @@ data ComparisonFunction :: Type where | |||
860 | Notequal :: ComparisonFunction | 1028 | Notequal :: ComparisonFunction |
861 | Gequal :: ComparisonFunction | 1029 | Gequal :: ComparisonFunction |
862 | Always :: ComparisonFunction | 1030 | Always :: ComparisonFunction |
1031 | |||
863 | data ProvokingVertex :: Type where | 1032 | data ProvokingVertex :: Type where |
864 | LastVertex :: ProvokingVertex | 1033 | LastVertex :: ProvokingVertex |
865 | FirstVertex :: ProvokingVertex | 1034 | FirstVertex :: ProvokingVertex |
1035 | |||
866 | data CullMode :: Type where | 1036 | data CullMode :: Type where |
867 | CullFront :: CullMode | 1037 | CullFront :: CullMode |
868 | CullBack :: CullMode | 1038 | CullBack :: CullMode |
869 | CullNone :: CullMode | 1039 | CullNone :: CullMode |
1040 | |||
870 | data PointSize (_ :: Type) :: Type where | 1041 | data PointSize (_ :: Type) :: Type where |
871 | PointSize :: forall a . Float -> PointSize a | 1042 | PointSize :: forall a . Float -> PointSize a |
872 | ProgramPointSize :: forall b . (b -> Float) -> PointSize b | 1043 | ProgramPointSize :: forall b . (b -> Float) -> PointSize b |
1044 | |||
873 | data PolygonMode (_ :: Type) :: Type where | 1045 | data PolygonMode (_ :: Type) :: Type where |
874 | PolygonFill :: forall a . PolygonMode a | 1046 | PolygonFill :: forall a . PolygonMode a |
875 | PolygonPoint :: forall b . PointSize b -> PolygonMode b | 1047 | PolygonPoint :: forall b . PointSize b -> PolygonMode b |
876 | PolygonLine :: forall c . Float -> PolygonMode c | 1048 | PolygonLine :: forall c . Float -> PolygonMode c |
1049 | |||
877 | data PolygonOffset :: Type where | 1050 | data PolygonOffset :: Type where |
878 | NoOffset :: PolygonOffset | 1051 | NoOffset :: PolygonOffset |
879 | Offset :: Float -> Float -> PolygonOffset | 1052 | Offset :: Float -> Float -> PolygonOffset |
1053 | |||
880 | data PointSpriteCoordOrigin :: Type where | 1054 | data PointSpriteCoordOrigin :: Type where |
881 | LowerLeft :: PointSpriteCoordOrigin | 1055 | LowerLeft :: PointSpriteCoordOrigin |
882 | UpperLeft :: PointSpriteCoordOrigin | 1056 | UpperLeft :: PointSpriteCoordOrigin |
1057 | |||
883 | primTexture :: HList '[] -> Vec (fromInt 2) Float -> Vec (fromInt 4) Float | 1058 | primTexture :: HList '[] -> Vec (fromInt 2) Float -> Vec (fromInt 4) Float |
1059 | |||
884 | Uniform :: forall (a :: _) . String -> a | 1060 | Uniform :: forall (a :: _) . String -> a |
1061 | |||
885 | data RasterContext (_ :: Type) :: PrimitiveType -> Type where | 1062 | data RasterContext (_ :: Type) :: PrimitiveType -> Type where |
886 | TriangleCtx | 1063 | TriangleCtx |
887 | :: forall a | 1064 | :: forall a |
@@ -891,6 +1068,7 @@ data RasterContext (_ :: Type) :: PrimitiveType -> Type where | |||
891 | :: forall b | 1068 | :: forall b |
892 | . PointSize b -> Float -> PointSpriteCoordOrigin -> RasterContext b Point | 1069 | . PointSize b -> Float -> PointSpriteCoordOrigin -> RasterContext b Point |
893 | LineCtx :: forall c . Float -> ProvokingVertex -> RasterContext c Line | 1070 | LineCtx :: forall c . Float -> ProvokingVertex -> RasterContext c Line |
1071 | |||
894 | data Blending :: Type -> Type where | 1072 | data Blending :: Type -> Type where |
895 | NoBlending :: forall (a :: _) . Blending a | 1073 | NoBlending :: forall (a :: _) . Blending a |
896 | BlendLogicOp :: forall (b :: _) . Integral b => LogicOperation -> Blending b | 1074 | BlendLogicOp :: forall (b :: _) . Integral b => LogicOperation -> Blending b |
@@ -900,10 +1078,13 @@ data Blending :: Type -> Type where | |||
900 | (HList (BlendingFactor : BlendingFactor : '[]) | 1078 | (HList (BlendingFactor : BlendingFactor : '[]) |
901 | : HList (BlendingFactor : BlendingFactor : '[]) : '[]) | 1079 | : HList (BlendingFactor : BlendingFactor : '[]) : '[]) |
902 | -> Vec (fromInt 4) Float -> Blending Float | 1080 | -> Vec (fromInt 4) Float -> Blending Float |
1081 | |||
903 | data StencilTests :: Type where | 1082 | data StencilTests :: Type where |
904 | 1083 | ||
1084 | |||
905 | data StencilOps :: Type where | 1085 | data StencilOps :: Type where |
906 | 1086 | ||
1087 | |||
907 | data FragmentOperation :: ImageKind -> Type where | 1088 | data FragmentOperation :: ImageKind -> Type where |
908 | ColorOp | 1089 | ColorOp |
909 | :: forall (a :: _) (b :: _) | 1090 | :: forall (a :: _) (b :: _) |
@@ -912,21 +1093,26 @@ data FragmentOperation :: ImageKind -> Type where | |||
912 | DepthOp :: ComparisonFunction -> Bool -> FragmentOperation Depth | 1093 | DepthOp :: ComparisonFunction -> Bool -> FragmentOperation Depth |
913 | StencilOp | 1094 | StencilOp |
914 | :: StencilTests -> StencilOps -> StencilOps -> FragmentOperation Stencil | 1095 | :: StencilTests -> StencilOps -> StencilOps -> FragmentOperation Stencil |
1096 | |||
915 | data Interpolated (_ :: Type) :: Type where | 1097 | data Interpolated (_ :: Type) :: Type where |
916 | Smooth :: forall a . Floating a => Interpolated a | 1098 | Smooth :: forall a . Floating a => Interpolated a |
917 | NoPerspective :: forall b . Floating b => Interpolated b | 1099 | NoPerspective :: forall b . Floating b => Interpolated b |
918 | Flat :: forall c . Interpolated c | 1100 | Flat :: forall c . Interpolated c |
1101 | |||
919 | rasterizePrimitive | 1102 | rasterizePrimitive |
920 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) | 1103 | :: forall (a :: _) (b :: _) (c :: _) (d :: _) |
921 | . (map Interpolated a ~ b, c ~ Vec (fromInt 4) Float : a) | 1104 | . (map Interpolated a ~ b, c ~ Vec (fromInt 4) Float : a) |
922 | => HList b | 1105 | => HList b |
923 | -> RasterContext (HList c) d | 1106 | -> RasterContext (HList c) d |
924 | -> Primitive (HList c) d -> FragmentStream (fromInt 1) (HList a) | 1107 | -> Primitive (HList c) d -> FragmentStream (fromInt 1) (HList a) |
1108 | |||
925 | rasterizePrimitives | 1109 | rasterizePrimitives |
926 | = \(a :: _) (b :: _) (c :: _) -> _rhs (concat (map (rasterizePrimitive b a) c)) | 1110 | = \(a :: _) (b :: _) (c :: _) -> _rhs (concat (map (rasterizePrimitive b a) c)) |
1111 | |||
927 | 'ImageLC :: Type -> Nat | 1112 | 'ImageLC :: Type -> Nat |
928 | 'ImageLC | 1113 | 'ImageLC |
929 | = \(a :: _) -> match'Image (\_ -> _) (\(b :: _) _ -> _rhs b) a undefined | 1114 | = \(a :: _) -> match'Image (\_ -> _) (\(b :: _) _ -> _rhs b) a undefined |
1115 | |||
930 | allSame :: forall (a :: _) . [a] -> Type | 1116 | allSame :: forall (a :: _) . [a] -> Type |
931 | allSame | 1117 | allSame |
932 | = \(a :: _) -> case'List | 1118 | = \(a :: _) -> case'List |
@@ -938,9 +1124,12 @@ allSame | |||
938 | (\(d :: _) (e :: _) -> _rhs ('T2 (b `'EqCTt` d) (allSame (d : e)))) | 1124 | (\(d :: _) (e :: _) -> _rhs ('T2 (b `'EqCTt` d) (allSame (d : e)))) |
939 | c) | 1125 | c) |
940 | a | 1126 | a |
1127 | |||
941 | sameLayerCounts = \(a :: _) -> _rhs (allSame (map 'ImageLC a)) | 1128 | sameLayerCounts = \(a :: _) -> _rhs (allSame (map 'ImageLC a)) |
1129 | |||
942 | data FrameBuffer (_ :: Nat) (_ :: [ImageKind]) :: Type where | 1130 | data FrameBuffer (_ :: Nat) (_ :: [ImageKind]) :: Type where |
943 | 1131 | ||
1132 | |||
944 | imageType' :: [ImageKind] -> [Type] | 1133 | imageType' :: [ImageKind] -> [Type] |
945 | imageType' | 1134 | imageType' |
946 | = \(a :: _) -> case'List | 1135 | = \(a :: _) -> case'List |
@@ -953,6 +1142,7 @@ imageType' | |||
953 | (_rhs (map imageType a)) | 1142 | (_rhs (map imageType a)) |
954 | b) | 1143 | b) |
955 | a | 1144 | a |
1145 | |||
956 | 'FragmentOperationKind :: Type -> ImageKind | 1146 | 'FragmentOperationKind :: Type -> ImageKind |
957 | 'FragmentOperationKind | 1147 | 'FragmentOperationKind |
958 | = \(a :: _) -> match'FragmentOperation | 1148 | = \(a :: _) -> match'FragmentOperation |
@@ -960,12 +1150,15 @@ imageType' | |||
960 | (\(b :: _) -> _rhs b) | 1150 | (\(b :: _) -> _rhs b) |
961 | a | 1151 | a |
962 | undefined | 1152 | undefined |
1153 | |||
963 | Accumulate | 1154 | Accumulate |
964 | :: forall (a :: _) (b :: Nat) (c :: [Type]) | 1155 | :: forall (a :: _) (b :: Nat) (c :: [Type]) |
965 | . (a ~ map FragmentOperationKind c) | 1156 | . (a ~ map FragmentOperationKind c) |
966 | => HList c | 1157 | => HList c |
967 | -> FragmentStream b (HList (imageType' a)) -> FrameBuffer b a -> FrameBuffer b a | 1158 | -> FragmentStream b (HList (imageType' a)) -> FrameBuffer b a -> FrameBuffer b a |
1159 | |||
968 | accumulateWith = \(a :: _) (b :: _) -> _rhs (HCons a (HCons b HNil)) | 1160 | accumulateWith = \(a :: _) (b :: _) -> _rhs (HCons a (HCons b HNil)) |
1161 | |||
969 | overlay | 1162 | overlay |
970 | = \(a :: _) (b :: _) -> hlistConsCase | 1163 | = \(a :: _) (b :: _) -> hlistConsCase |
971 | _ | 1164 | _ |
@@ -974,43 +1167,57 @@ overlay | |||
974 | (\(e :: _) (f :: _) -> hlistNilCase _ (_rhs (Accumulate c e a)) f) | 1167 | (\(e :: _) (f :: _) -> hlistNilCase _ (_rhs (Accumulate c e a)) f) |
975 | d) | 1168 | d) |
976 | b | 1169 | b |
1170 | |||
977 | infixl 0 overlay | 1171 | infixl 0 overlay |
1172 | |||
978 | 'GetImageKind :: Type -> ImageKind | 1173 | 'GetImageKind :: Type -> ImageKind |
979 | 'GetImageKind | 1174 | 'GetImageKind |
980 | = \(a :: _) -> match'Image (\_ -> _) (\_ (b :: _) -> _rhs b) a undefined | 1175 | = \(a :: _) -> match'Image (\_ -> _) (\_ (b :: _) -> _rhs b) a undefined |
1176 | |||
981 | FrameBuffer | 1177 | FrameBuffer |
982 | :: forall (a :: [Type]) | 1178 | :: forall (a :: [Type]) |
983 | . sameLayerCounts a | 1179 | . sameLayerCounts a |
984 | => HList a -> FrameBuffer (ImageLC (head a)) (map GetImageKind a) | 1180 | => HList a -> FrameBuffer (ImageLC (head a)) (map GetImageKind a) |
1181 | |||
985 | imageFrame = _rhs FrameBuffer | 1182 | imageFrame = _rhs FrameBuffer |
1183 | |||
986 | accumulate | 1184 | accumulate |
987 | = \(a :: _) (b :: _) (c :: _) (d :: _) -> _rhs | 1185 | = \(a :: _) (b :: _) (c :: _) (d :: _) -> _rhs |
988 | (Accumulate a (mapFragments b c) d) | 1186 | (Accumulate a (mapFragments b c) d) |
1187 | |||
989 | PrjImage | 1188 | PrjImage |
990 | :: forall (a :: _) . FrameBuffer (fromInt 1) (a : '[]) -> Image (fromInt 1) a | 1189 | :: forall (a :: _) . FrameBuffer (fromInt 1) (a : '[]) -> Image (fromInt 1) a |
1190 | |||
991 | PrjImageColor | 1191 | PrjImageColor |
992 | :: FrameBuffer (fromInt 1) ('Depth : 'Color (Vec (fromInt 4) Float) : '[]) | 1192 | :: FrameBuffer (fromInt 1) ('Depth : 'Color (Vec (fromInt 4) Float) : '[]) |
993 | -> Image (fromInt 1) (Color (Vec (fromInt 4) Float)) | 1193 | -> Image (fromInt 1) (Color (Vec (fromInt 4) Float)) |
1194 | |||
994 | data Output :: Type where | 1195 | data Output :: Type where |
995 | ScreenOut :: forall (a :: _) (b :: _) . FrameBuffer a b -> Output | 1196 | ScreenOut :: forall (a :: _) (b :: _) . FrameBuffer a b -> Output |
1197 | |||
996 | renderFrame = _rhs ScreenOut | 1198 | renderFrame = _rhs ScreenOut |
1199 | |||
997 | data Texture :: Type where | 1200 | data Texture :: Type where |
998 | Texture2DSlot :: String -> Texture | 1201 | Texture2DSlot :: String -> Texture |
999 | Texture2D | 1202 | Texture2D |
1000 | :: Vec (fromInt 2) Int | 1203 | :: Vec (fromInt 2) Int |
1001 | -> Image (fromInt 1) (Color (Vec (fromInt 4) Float)) -> Texture | 1204 | -> Image (fromInt 1) (Color (Vec (fromInt 4) Float)) -> Texture |
1205 | |||
1002 | data Filter :: Type where | 1206 | data Filter :: Type where |
1003 | PointFilter :: Filter | 1207 | PointFilter :: Filter |
1004 | LinearFilter :: Filter | 1208 | LinearFilter :: Filter |
1209 | |||
1005 | data EdgeMode :: Type where | 1210 | data EdgeMode :: Type where |
1006 | Repeat :: EdgeMode | 1211 | Repeat :: EdgeMode |
1007 | MirroredRepeat :: EdgeMode | 1212 | MirroredRepeat :: EdgeMode |
1008 | ClampToEdge :: EdgeMode | 1213 | ClampToEdge :: EdgeMode |
1214 | |||
1009 | data Sampler :: Type where | 1215 | data Sampler :: Type where |
1010 | Sampler :: Filter -> EdgeMode -> Texture -> Sampler | 1216 | Sampler :: Filter -> EdgeMode -> Texture -> Sampler |
1217 | |||
1011 | texture2D :: Sampler -> Vec (fromInt 2) Float -> Vec (fromInt 4) Float | 1218 | texture2D :: Sampler -> Vec (fromInt 2) Float -> Vec (fromInt 4) Float |
1219 | |||
1012 | accumulationContext = \(a :: _) -> _rhs a | 1220 | accumulationContext = \(a :: _) -> _rhs a |
1013 | main is not found | ||
1014 | ------------ trace | 1221 | ------------ trace |
1015 | id :: forall a . a -> a | 1222 | id :: forall a . a -> a |
1016 | 'VecS :: Type -> Nat -> Type | 1223 | 'VecS :: Type -> Nat -> Type |
diff --git a/testdata/Internals.out b/testdata/Internals.out index b3eac04a..22ff0f64 100644 --- a/testdata/Internals.out +++ b/testdata/Internals.out | |||
@@ -1,60 +1,100 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | typeAnn = \(a :: _) -> _rhs a | 3 | typeAnn = \(a :: _) -> _rhs a |
4 | |||
3 | parens = \(a :: _) -> _rhs a | 5 | parens = \(a :: _) -> _rhs a |
6 | |||
4 | undefined :: forall a . a | 7 | undefined :: forall a . a |
8 | |||
5 | primFix :: forall a . (a -> a) -> a | 9 | primFix :: forall a . (a -> a) -> a |
10 | |||
6 | data Unit :: Type where | 11 | data Unit :: Type where |
7 | TT :: Unit | 12 | TT :: Unit |
13 | |||
8 | data String :: Type where | 14 | data String :: Type where |
9 | 15 | ||
16 | |||
10 | data Empty (_ :: String) :: Type where | 17 | data Empty (_ :: String) :: Type where |
11 | 18 | ||
19 | |||
12 | unsafeCoerce :: forall (a :: _) (b :: _) . a -> b | 20 | unsafeCoerce :: forall (a :: _) (b :: _) . a -> b |
21 | |||
13 | 'EqCT :: forall a -> a -> a -> Type | 22 | 'EqCT :: forall a -> a -> a -> Type |
23 | |||
14 | parEval :: forall (a :: _) -> a -> a -> a | 24 | parEval :: forall (a :: _) -> a -> a -> a |
25 | |||
15 | 'T2 :: Type -> Type -> Type | 26 | 'T2 :: Type -> Type -> Type |
27 | |||
16 | match'Type :: forall (a :: Type -> Type) -> a Type -> forall b -> a b -> a b | 28 | match'Type :: forall (a :: Type -> Type) -> a Type -> forall b -> a b -> a b |
29 | |||
17 | 'EqCTt = _rhs ('EqCT (_ :: _)) | 30 | 'EqCTt = _rhs ('EqCT (_ :: _)) |
31 | |||
18 | t2C :: Unit -> Unit -> Unit | 32 | t2C :: Unit -> Unit -> Unit |
33 | |||
19 | data Int :: Type where | 34 | data Int :: Type where |
20 | 35 | ||
36 | |||
21 | data Word :: Type where | 37 | data Word :: Type where |
22 | 38 | ||
39 | |||
23 | data Float :: Type where | 40 | data Float :: Type where |
24 | 41 | ||
42 | |||
25 | data Char :: Type where | 43 | data Char :: Type where |
26 | 44 | ||
45 | |||
27 | data Bool :: Type where | 46 | data Bool :: Type where |
28 | False :: Bool | 47 | False :: Bool |
29 | True :: Bool | 48 | True :: Bool |
49 | |||
30 | data Ordering :: Type where | 50 | data Ordering :: Type where |
31 | LT :: Ordering | 51 | LT :: Ordering |
32 | EQ :: Ordering | 52 | EQ :: Ordering |
33 | GT :: Ordering | 53 | GT :: Ordering |
54 | |||
34 | data Nat :: Type where | 55 | data Nat :: Type where |
35 | Zero :: Nat | 56 | Zero :: Nat |
36 | Succ :: Nat -> Nat | 57 | Succ :: Nat -> Nat |
58 | |||
37 | primIntToWord :: Int -> Word | 59 | primIntToWord :: Int -> Word |
60 | |||
38 | primIntToFloat :: Int -> Float | 61 | primIntToFloat :: Int -> Float |
62 | |||
39 | primIntToNat :: Int -> Nat | 63 | primIntToNat :: Int -> Nat |
64 | |||
40 | primCompareInt :: Int -> Int -> Ordering | 65 | primCompareInt :: Int -> Int -> Ordering |
66 | |||
41 | primCompareWord :: Word -> Word -> Ordering | 67 | primCompareWord :: Word -> Word -> Ordering |
68 | |||
42 | primCompareFloat :: Float -> Float -> Ordering | 69 | primCompareFloat :: Float -> Float -> Ordering |
70 | |||
43 | primCompareChar :: Char -> Char -> Ordering | 71 | primCompareChar :: Char -> Char -> Ordering |
72 | |||
44 | primCompareString :: String -> String -> Ordering | 73 | primCompareString :: String -> String -> Ordering |
74 | |||
45 | primNegateInt :: Int -> Int | 75 | primNegateInt :: Int -> Int |
76 | |||
46 | primNegateWord :: Word -> Word | 77 | primNegateWord :: Word -> Word |
78 | |||
47 | primNegateFloat :: Float -> Float | 79 | primNegateFloat :: Float -> Float |
80 | |||
48 | primAddInt :: Int -> Int -> Int | 81 | primAddInt :: Int -> Int -> Int |
82 | |||
49 | primSubInt :: Int -> Int -> Int | 83 | primSubInt :: Int -> Int -> Int |
84 | |||
50 | primModInt :: Int -> Int -> Int | 85 | primModInt :: Int -> Int -> Int |
86 | |||
51 | primSqrtFloat :: Float -> Float | 87 | primSqrtFloat :: Float -> Float |
88 | |||
52 | primRound :: Float -> Int | 89 | primRound :: Float -> Int |
90 | |||
53 | primIfThenElse :: forall (a :: _) . Bool -> a -> a -> a | 91 | primIfThenElse :: forall (a :: _) . Bool -> a -> a -> a |
54 | primIfThenElse | 92 | primIfThenElse |
55 | = \(a :: _) (b :: _) (c :: _) -> case'Bool (\_ -> _) (_rhs c) (_rhs b) a | 93 | = \(a :: _) (b :: _) (c :: _) -> case'Bool (\_ -> _) (_rhs c) (_rhs b) a |
94 | |||
56 | isEQ | 95 | isEQ |
57 | = \(a :: _) -> case'Ordering (\_ -> _) (_rhs False) (_rhs True) (_rhs False) a | 96 | = \(a :: _) -> case'Ordering (\_ -> _) (_rhs False) (_rhs True) (_rhs False) a |
97 | |||
58 | 'Num :: Type -> Type | 98 | 'Num :: Type -> Type |
59 | 'Num | 99 | 'Num |
60 | = \(a :: _) -> match'Int | 100 | = \(a :: _) -> match'Int |
@@ -74,6 +114,7 @@ isEQ | |||
74 | (_rhs 'Unit) | 114 | (_rhs 'Unit) |
75 | a | 115 | a |
76 | (_rhs ('Empty "no instance of 'Num on ???"))))) | 116 | (_rhs ('Empty "no instance of 'Num on ???"))))) |
117 | |||
77 | fromInt :: forall a . Num a => Int -> a | 118 | fromInt :: forall a . Num a => Int -> a |
78 | fromInt | 119 | fromInt |
79 | = \ @a @_ -> match'Int | 120 | = \ @a @_ -> match'Int |
@@ -89,6 +130,7 @@ fromInt | |||
89 | (_rhs \(e := _rhs primIntToFloat) -> e) | 130 | (_rhs \(e := _rhs primIntToFloat) -> e) |
90 | a | 131 | a |
91 | (match'Nat (\_ -> _) (_rhs \(f := _rhs primIntToNat) -> f) a (_rhs undefined)))) | 132 | (match'Nat (\_ -> _) (_rhs \(f := _rhs primIntToNat) -> f) a (_rhs undefined)))) |
133 | |||
92 | compare :: forall a . Num a => a -> a -> Ordering | 134 | compare :: forall a . Num a => a -> a -> Ordering |
93 | compare | 135 | compare |
94 | = \ @a @_ -> match'Int | 136 | = \ @a @_ -> match'Int |
@@ -104,6 +146,7 @@ compare | |||
104 | (_rhs \(d := _rhs primCompareFloat) -> d) | 146 | (_rhs \(d := _rhs primCompareFloat) -> d) |
105 | a | 147 | a |
106 | (match'Nat (\_ -> _) (_rhs \(e := _rhs undefined) -> e) a (_rhs undefined)))) | 148 | (match'Nat (\_ -> _) (_rhs \(e := _rhs undefined) -> e) a (_rhs undefined)))) |
149 | |||
107 | negate :: forall a . Num a => a -> a | 150 | negate :: forall a . Num a => a -> a |
108 | negate | 151 | negate |
109 | = \ @a @_ -> match'Int | 152 | = \ @a @_ -> match'Int |
@@ -119,6 +162,7 @@ negate | |||
119 | (_rhs \(d := _rhs primNegateFloat) -> d) | 162 | (_rhs \(d := _rhs primNegateFloat) -> d) |
120 | a | 163 | a |
121 | (match'Nat (\_ -> _) (_rhs \(e := _rhs undefined) -> e) a (_rhs undefined)))) | 164 | (match'Nat (\_ -> _) (_rhs \(e := _rhs undefined) -> e) a (_rhs undefined)))) |
165 | |||
122 | 'Eq :: Type -> Type | 166 | 'Eq :: Type -> Type |
123 | 'Eq | 167 | 'Eq |
124 | = \(a :: _) -> match'String | 168 | = \(a :: _) -> match'String |
@@ -146,6 +190,7 @@ negate | |||
146 | (_rhs 'Unit) | 190 | (_rhs 'Unit) |
147 | a | 191 | a |
148 | (_rhs ('Empty "no instance of 'Eq on ???"))))))) | 192 | (_rhs ('Empty "no instance of 'Eq on ???"))))))) |
193 | |||
149 | (==) :: forall a . Eq a => a -> a -> Bool | 194 | (==) :: forall a . Eq a => a -> a -> Bool |
150 | (==) | 195 | (==) |
151 | = \ @a @_ -> match'String | 196 | = \ @a @_ -> match'String |
@@ -185,19 +230,24 @@ negate | |||
185 | r) -> q) | 230 | r) -> q) |
186 | a | 231 | a |
187 | (_rhs undefined)))))) | 232 | (_rhs undefined)))))) |
233 | |||
188 | infix 4 == | 234 | infix 4 == |
235 | |||
189 | data List (_ :: Type) :: Type where | 236 | data List (_ :: Type) :: Type where |
190 | [] :: forall a . [a] | 237 | [] :: forall a . [a] |
191 | (:) :: forall b . b -> [b] -> [b] | 238 | (:) :: forall b . b -> [b] -> [b] |
239 | |||
192 | infixr 5 : | 240 | infixr 5 : |
241 | |||
193 | data HList :: [Type] -> Type where | 242 | data HList :: [Type] -> Type where |
194 | HNil :: HList '[] | 243 | HNil :: HList '[] |
195 | HCons :: forall (a :: _) (b :: _) . a -> HList b -> HList (a : b) | 244 | HCons :: forall (a :: _) (b :: _) . a -> HList b -> HList (a : b) |
245 | |||
196 | hlistNilCase :: forall (a :: _) -> a -> HList [] -> a | 246 | hlistNilCase :: forall (a :: _) -> a -> HList [] -> a |
247 | |||
197 | hlistConsCase | 248 | hlistConsCase |
198 | :: forall a (b :: [Type]) | 249 | :: forall a (b :: [Type]) |
199 | . forall (c :: _) -> (a -> HList b -> c) -> HList (a : b) -> c | 250 | . forall (c :: _) -> (a -> HList b -> c) -> HList (a : b) -> c |
200 | main is not found | ||
201 | ------------ trace | 251 | ------------ trace |
202 | typeAnn :: forall a . a -> a | 252 | typeAnn :: forall a . a -> a |
203 | parens :: forall a . a -> a | 253 | parens :: forall a . a -> a |
diff --git a/testdata/Material.out b/testdata/Material.out index 360c8021..27c646fd 100644 --- a/testdata/Material.out +++ b/testdata/Material.out | |||
@@ -1,16 +1,23 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | identityLight :: Float | 3 | identityLight :: Float |
3 | identityLight = _rhs (fromInt 1) | 4 | identityLight = _rhs (fromInt 1) |
5 | |||
4 | data Entity :: Type where | 6 | data Entity :: Type where |
5 | Entity | 7 | Entity |
6 | :: Vec (fromInt 4) Float | 8 | :: Vec (fromInt 4) Float |
7 | -> Vec (fromInt 4) Float | 9 | -> Vec (fromInt 4) Float |
8 | -> Vec (fromInt 3) Float -> Vec (fromInt 4) Float -> Entity | 10 | -> Vec (fromInt 3) Float -> Vec (fromInt 4) Float -> Entity |
11 | |||
9 | eAmbientLight = \(a :: _) -> case'Entity (\_ -> _) (\(b :: _) _ _ _ -> _rhs b) a | 12 | eAmbientLight = \(a :: _) -> case'Entity (\_ -> _) (\(b :: _) _ _ _ -> _rhs b) a |
13 | |||
10 | eDirectedLight | 14 | eDirectedLight |
11 | = \(a :: _) -> case'Entity (\_ -> _) (\_ (b :: _) _ _ -> _rhs b) a | 15 | = \(a :: _) -> case'Entity (\_ -> _) (\_ (b :: _) _ _ -> _rhs b) a |
16 | |||
12 | eLightDir = \(a :: _) -> case'Entity (\_ -> _) (\_ _ (b :: _) _ -> _rhs b) a | 17 | eLightDir = \(a :: _) -> case'Entity (\_ -> _) (\_ _ (b :: _) _ -> _rhs b) a |
18 | |||
13 | eShaderRGBA = \(a :: _) -> case'Entity (\_ -> _) (\_ _ _ (b :: _) -> _rhs b) a | 19 | eShaderRGBA = \(a :: _) -> case'Entity (\_ -> _) (\_ _ _ (b :: _) -> _rhs b) a |
20 | |||
14 | data WaveType :: Type where | 21 | data WaveType :: Type where |
15 | WT_Sin :: WaveType | 22 | WT_Sin :: WaveType |
16 | WT_Triangle :: WaveType | 23 | WT_Triangle :: WaveType |
@@ -18,8 +25,10 @@ data WaveType :: Type where | |||
18 | WT_Sawtooth :: WaveType | 25 | WT_Sawtooth :: WaveType |
19 | WT_InverseSawtooth :: WaveType | 26 | WT_InverseSawtooth :: WaveType |
20 | WT_Noise :: WaveType | 27 | WT_Noise :: WaveType |
28 | |||
21 | data Wave :: Type where | 29 | data Wave :: Type where |
22 | Wave :: WaveType -> Float -> Float -> Float -> Float -> Wave | 30 | Wave :: WaveType -> Float -> Float -> Float -> Float -> Wave |
31 | |||
23 | data Deform :: Type where | 32 | data Deform :: Type where |
24 | D_AutoSprite :: Deform | 33 | D_AutoSprite :: Deform |
25 | D_AutoSprite2 :: Deform | 34 | D_AutoSprite2 :: Deform |
@@ -36,10 +45,12 @@ data Deform :: Type where | |||
36 | D_Text6 :: Deform | 45 | D_Text6 :: Deform |
37 | D_Text7 :: Deform | 46 | D_Text7 :: Deform |
38 | D_Wave :: Float -> Wave -> Deform | 47 | D_Wave :: Float -> Wave -> Deform |
48 | |||
39 | data CullType :: Type where | 49 | data CullType :: Type where |
40 | CT_FrontSided :: CullType | 50 | CT_FrontSided :: CullType |
41 | CT_BackSided :: CullType | 51 | CT_BackSided :: CullType |
42 | CT_TwoSided :: CullType | 52 | CT_TwoSided :: CullType |
53 | |||
43 | data Blending' :: Type where | 54 | data Blending' :: Type where |
44 | B_DstAlpha :: Blending' | 55 | B_DstAlpha :: Blending' |
45 | B_DstColor :: Blending' | 56 | B_DstColor :: Blending' |
@@ -52,6 +63,7 @@ data Blending' :: Type where | |||
52 | B_SrcAlphaSaturate :: Blending' | 63 | B_SrcAlphaSaturate :: Blending' |
53 | B_SrcColor :: Blending' | 64 | B_SrcColor :: Blending' |
54 | B_Zero :: Blending' | 65 | B_Zero :: Blending' |
66 | |||
55 | data RGBGen :: Type where | 67 | data RGBGen :: Type where |
56 | RGB_Wave :: Wave -> RGBGen | 68 | RGB_Wave :: Wave -> RGBGen |
57 | RGB_Const :: Float -> Float -> Float -> RGBGen | 69 | RGB_Const :: Float -> Float -> Float -> RGBGen |
@@ -64,6 +76,7 @@ data RGBGen :: Type where | |||
64 | RGB_LightingDiffuse :: RGBGen | 76 | RGB_LightingDiffuse :: RGBGen |
65 | RGB_OneMinusVertex :: RGBGen | 77 | RGB_OneMinusVertex :: RGBGen |
66 | RGB_Undefined :: RGBGen | 78 | RGB_Undefined :: RGBGen |
79 | |||
67 | data AlphaGen :: Type where | 80 | data AlphaGen :: Type where |
68 | A_Wave :: Wave -> AlphaGen | 81 | A_Wave :: Wave -> AlphaGen |
69 | A_Const :: Float -> AlphaGen | 82 | A_Const :: Float -> AlphaGen |
@@ -74,12 +87,14 @@ data AlphaGen :: Type where | |||
74 | A_Vertex :: AlphaGen | 87 | A_Vertex :: AlphaGen |
75 | A_LightingSpecular :: AlphaGen | 88 | A_LightingSpecular :: AlphaGen |
76 | A_OneMinusVertex :: AlphaGen | 89 | A_OneMinusVertex :: AlphaGen |
90 | |||
77 | data TCGen :: Type where | 91 | data TCGen :: Type where |
78 | TG_Base :: TCGen | 92 | TG_Base :: TCGen |
79 | TG_Lightmap :: TCGen | 93 | TG_Lightmap :: TCGen |
80 | TG_Environment :: TCGen | 94 | TG_Environment :: TCGen |
81 | TG_Vector :: Vec (fromInt 3) Float -> Vec (fromInt 3) Float -> TCGen | 95 | TG_Vector :: Vec (fromInt 3) Float -> Vec (fromInt 3) Float -> TCGen |
82 | TG_Undefined :: TCGen | 96 | TG_Undefined :: TCGen |
97 | |||
83 | data TCMod :: Type where | 98 | data TCMod :: Type where |
84 | TM_EntityTranslate :: TCMod | 99 | TM_EntityTranslate :: TCMod |
85 | TM_Rotate :: Float -> TCMod | 100 | TM_Rotate :: Float -> TCMod |
@@ -88,19 +103,23 @@ data TCMod :: Type where | |||
88 | TM_Stretch :: Wave -> TCMod | 103 | TM_Stretch :: Wave -> TCMod |
89 | TM_Transform :: Float -> Float -> Float -> Float -> Float -> Float -> TCMod | 104 | TM_Transform :: Float -> Float -> Float -> Float -> Float -> Float -> TCMod |
90 | TM_Turb :: Float -> Float -> Float -> Float -> TCMod | 105 | TM_Turb :: Float -> Float -> Float -> Float -> TCMod |
106 | |||
91 | data StageTexture :: Type where | 107 | data StageTexture :: Type where |
92 | ST_Map :: String -> StageTexture | 108 | ST_Map :: String -> StageTexture |
93 | ST_ClampMap :: String -> StageTexture | 109 | ST_ClampMap :: String -> StageTexture |
94 | ST_AnimMap :: Float -> [String] -> StageTexture | 110 | ST_AnimMap :: Float -> [String] -> StageTexture |
95 | ST_Lightmap :: StageTexture | 111 | ST_Lightmap :: StageTexture |
96 | ST_WhiteImage :: StageTexture | 112 | ST_WhiteImage :: StageTexture |
113 | |||
97 | data AlphaFunction :: Type where | 114 | data AlphaFunction :: Type where |
98 | A_Gt0 :: AlphaFunction | 115 | A_Gt0 :: AlphaFunction |
99 | A_Lt128 :: AlphaFunction | 116 | A_Lt128 :: AlphaFunction |
100 | A_Ge128 :: AlphaFunction | 117 | A_Ge128 :: AlphaFunction |
118 | |||
101 | data DepthFunction :: Type where | 119 | data DepthFunction :: Type where |
102 | D_Equal :: DepthFunction | 120 | D_Equal :: DepthFunction |
103 | D_Lequal :: DepthFunction | 121 | D_Lequal :: DepthFunction |
122 | |||
104 | data StageAttrs :: Type where | 123 | data StageAttrs :: Type where |
105 | StageAttrs | 124 | StageAttrs |
106 | :: Maybe (HList (Blending' : Blending' : '[])) | 125 | :: Maybe (HList (Blending' : Blending' : '[])) |
@@ -110,61 +129,73 @@ data StageAttrs :: Type where | |||
110 | -> [TCMod] | 129 | -> [TCMod] |
111 | -> StageTexture | 130 | -> StageTexture |
112 | -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String -> StageAttrs | 131 | -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String -> StageAttrs |
132 | |||
113 | saBlend | 133 | saBlend |
114 | = \(a :: _) -> case'StageAttrs | 134 | = \(a :: _) -> case'StageAttrs |
115 | (\_ -> _) | 135 | (\_ -> _) |
116 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 136 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
117 | a | 137 | a |
138 | |||
118 | saRGBGen | 139 | saRGBGen |
119 | = \(a :: _) -> case'StageAttrs | 140 | = \(a :: _) -> case'StageAttrs |
120 | (\_ -> _) | 141 | (\_ -> _) |
121 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) | 142 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) |
122 | a | 143 | a |
144 | |||
123 | saAlphaGen | 145 | saAlphaGen |
124 | = \(a :: _) -> case'StageAttrs | 146 | = \(a :: _) -> case'StageAttrs |
125 | (\_ -> _) | 147 | (\_ -> _) |
126 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) | 148 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) |
127 | a | 149 | a |
150 | |||
128 | saTCGen | 151 | saTCGen |
129 | = \(a :: _) -> case'StageAttrs | 152 | = \(a :: _) -> case'StageAttrs |
130 | (\_ -> _) | 153 | (\_ -> _) |
131 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) | 154 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) |
132 | a | 155 | a |
156 | |||
133 | saTCMod | 157 | saTCMod |
134 | = \(a :: _) -> case'StageAttrs | 158 | = \(a :: _) -> case'StageAttrs |
135 | (\_ -> _) | 159 | (\_ -> _) |
136 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) | 160 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) |
137 | a | 161 | a |
162 | |||
138 | saTexture | 163 | saTexture |
139 | = \(a :: _) -> case'StageAttrs | 164 | = \(a :: _) -> case'StageAttrs |
140 | (\_ -> _) | 165 | (\_ -> _) |
141 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) | 166 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) |
142 | a | 167 | a |
168 | |||
143 | saDepthWrite | 169 | saDepthWrite |
144 | = \(a :: _) -> case'StageAttrs | 170 | = \(a :: _) -> case'StageAttrs |
145 | (\_ -> _) | 171 | (\_ -> _) |
146 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) | 172 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) |
147 | a | 173 | a |
174 | |||
148 | saDepthFunc | 175 | saDepthFunc |
149 | = \(a :: _) -> case'StageAttrs | 176 | = \(a :: _) -> case'StageAttrs |
150 | (\_ -> _) | 177 | (\_ -> _) |
151 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) | 178 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) |
152 | a | 179 | a |
180 | |||
153 | saAlphaFunc | 181 | saAlphaFunc |
154 | = \(a :: _) -> case'StageAttrs | 182 | = \(a :: _) -> case'StageAttrs |
155 | (\_ -> _) | 183 | (\_ -> _) |
156 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) | 184 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) |
157 | a | 185 | a |
186 | |||
158 | saDepthMaskExplicit | 187 | saDepthMaskExplicit |
159 | = \(a :: _) -> case'StageAttrs | 188 | = \(a :: _) -> case'StageAttrs |
160 | (\_ -> _) | 189 | (\_ -> _) |
161 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) | 190 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) |
162 | a | 191 | a |
192 | |||
163 | saTextureUniform | 193 | saTextureUniform |
164 | = \(a :: _) -> case'StageAttrs | 194 | = \(a :: _) -> case'StageAttrs |
165 | (\_ -> _) | 195 | (\_ -> _) |
166 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) | 196 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) |
167 | a | 197 | a |
198 | |||
168 | defaultStageAttrs :: StageAttrs | 199 | defaultStageAttrs :: StageAttrs |
169 | defaultStageAttrs | 200 | defaultStageAttrs |
170 | = _rhs | 201 | = _rhs |
@@ -180,6 +211,7 @@ defaultStageAttrs | |||
180 | Nothing | 211 | Nothing |
181 | False | 212 | False |
182 | "") | 213 | "") |
214 | |||
183 | data CommonAttrs :: Type where | 215 | data CommonAttrs :: Type where |
184 | CommonAttrs | 216 | CommonAttrs |
185 | :: HList '[] | 217 | :: HList '[] |
@@ -189,66 +221,79 @@ data CommonAttrs :: Type where | |||
189 | -> Bool | 221 | -> Bool |
190 | -> Bool | 222 | -> Bool |
191 | -> CullType -> [Deform] -> Bool -> Bool -> [StageAttrs] -> Bool -> CommonAttrs | 223 | -> CullType -> [Deform] -> Bool -> Bool -> [StageAttrs] -> Bool -> CommonAttrs |
224 | |||
192 | caSkyParms | 225 | caSkyParms |
193 | = \(a :: _) -> case'CommonAttrs | 226 | = \(a :: _) -> case'CommonAttrs |
194 | (\_ -> _) | 227 | (\_ -> _) |
195 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 228 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
196 | a | 229 | a |
230 | |||
197 | caFogParms | 231 | caFogParms |
198 | = \(a :: _) -> case'CommonAttrs | 232 | = \(a :: _) -> case'CommonAttrs |
199 | (\_ -> _) | 233 | (\_ -> _) |
200 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 234 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
201 | a | 235 | a |
236 | |||
202 | caPortal | 237 | caPortal |
203 | = \(a :: _) -> case'CommonAttrs | 238 | = \(a :: _) -> case'CommonAttrs |
204 | (\_ -> _) | 239 | (\_ -> _) |
205 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) | 240 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) |
206 | a | 241 | a |
242 | |||
207 | caSort | 243 | caSort |
208 | = \(a :: _) -> case'CommonAttrs | 244 | = \(a :: _) -> case'CommonAttrs |
209 | (\_ -> _) | 245 | (\_ -> _) |
210 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) | 246 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) |
211 | a | 247 | a |
248 | |||
212 | caEntityMergable | 249 | caEntityMergable |
213 | = \(a :: _) -> case'CommonAttrs | 250 | = \(a :: _) -> case'CommonAttrs |
214 | (\_ -> _) | 251 | (\_ -> _) |
215 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) | 252 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) |
216 | a | 253 | a |
254 | |||
217 | caFogOnly | 255 | caFogOnly |
218 | = \(a :: _) -> case'CommonAttrs | 256 | = \(a :: _) -> case'CommonAttrs |
219 | (\_ -> _) | 257 | (\_ -> _) |
220 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) | 258 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) |
221 | a | 259 | a |
260 | |||
222 | caCull | 261 | caCull |
223 | = \(a :: _) -> case'CommonAttrs | 262 | = \(a :: _) -> case'CommonAttrs |
224 | (\_ -> _) | 263 | (\_ -> _) |
225 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) | 264 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) |
226 | a | 265 | a |
266 | |||
227 | caDeformVertexes | 267 | caDeformVertexes |
228 | = \(a :: _) -> case'CommonAttrs | 268 | = \(a :: _) -> case'CommonAttrs |
229 | (\_ -> _) | 269 | (\_ -> _) |
230 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) | 270 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) |
231 | a | 271 | a |
272 | |||
232 | caNoMipMaps | 273 | caNoMipMaps |
233 | = \(a :: _) -> case'CommonAttrs | 274 | = \(a :: _) -> case'CommonAttrs |
234 | (\_ -> _) | 275 | (\_ -> _) |
235 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) | 276 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) |
236 | a | 277 | a |
278 | |||
237 | caPolygonOffset | 279 | caPolygonOffset |
238 | = \(a :: _) -> case'CommonAttrs | 280 | = \(a :: _) -> case'CommonAttrs |
239 | (\_ -> _) | 281 | (\_ -> _) |
240 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) | 282 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) |
241 | a | 283 | a |
284 | |||
242 | caStages | 285 | caStages |
243 | = \(a :: _) -> case'CommonAttrs | 286 | = \(a :: _) -> case'CommonAttrs |
244 | (\_ -> _) | 287 | (\_ -> _) |
245 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) | 288 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) |
246 | a | 289 | a |
290 | |||
247 | caIsSky | 291 | caIsSky |
248 | = \(a :: _) -> case'CommonAttrs | 292 | = \(a :: _) -> case'CommonAttrs |
249 | (\_ -> _) | 293 | (\_ -> _) |
250 | (\_ _ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) | 294 | (\_ _ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) |
251 | a | 295 | a |
296 | |||
252 | defaultCommonAttrs :: CommonAttrs | 297 | defaultCommonAttrs :: CommonAttrs |
253 | defaultCommonAttrs | 298 | defaultCommonAttrs |
254 | = _rhs | 299 | = _rhs |
@@ -265,7 +310,6 @@ defaultCommonAttrs | |||
265 | False | 310 | False |
266 | [] | 311 | [] |
267 | False) | 312 | False) |
268 | main is not found | ||
269 | ------------ trace | 313 | ------------ trace |
270 | identityLight :: Float | 314 | identityLight :: Float |
271 | 'Entity :: Type | 315 | 'Entity :: Type |
diff --git a/testdata/Prelude.out b/testdata/Prelude.out index 3e8b2b17..e1b26503 100644 --- a/testdata/Prelude.out +++ b/testdata/Prelude.out | |||
@@ -1,15 +1,27 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | infixr 9 . | 3 | infixr 9 . |
4 | |||
3 | infixl 7 PrimMulMatVec | 5 | infixl 7 PrimMulMatVec |
6 | |||
4 | infixl 7 PrimDot | 7 | infixl 7 PrimDot |
8 | |||
5 | infixr 5 ++ | 9 | infixr 5 ++ |
10 | |||
6 | infixr 3 *** | 11 | infixr 3 *** |
12 | |||
7 | infixr 0 $ | 13 | infixr 0 $ |
14 | |||
8 | const = \(a :: _) _ -> _rhs a | 15 | const = \(a :: _) _ -> _rhs a |
16 | |||
9 | otherwise = _rhs True | 17 | otherwise = _rhs True |
18 | |||
10 | (&) = \(a :: _) (b :: _) -> _rhs (b a) | 19 | (&) = \(a :: _) (b :: _) -> _rhs (b a) |
20 | |||
11 | ($) = _rhs \(a :: _) (b :: _) -> a b | 21 | ($) = _rhs \(a :: _) (b :: _) -> a b |
22 | |||
12 | (.) = _rhs \(a :: _) (b :: _) (c :: _) -> a (b c) | 23 | (.) = _rhs \(a :: _) (b :: _) (c :: _) -> a (b c) |
24 | |||
13 | uncurry | 25 | uncurry |
14 | = \(a :: _) (b :: _) -> hlistConsCase | 26 | = \(a :: _) (b :: _) -> hlistConsCase |
15 | _ | 27 | _ |
@@ -18,6 +30,7 @@ uncurry | |||
18 | (\(e :: _) (f :: _) -> hlistNilCase _ (_rhs (a c e)) f) | 30 | (\(e :: _) (f :: _) -> hlistNilCase _ (_rhs (a c e)) f) |
19 | d) | 31 | d) |
20 | b | 32 | b |
33 | |||
21 | (***) | 34 | (***) |
22 | = \(a :: _) (b :: _) (c :: _) -> hlistConsCase | 35 | = \(a :: _) (b :: _) (c :: _) -> hlistConsCase |
23 | _ | 36 | _ |
@@ -26,7 +39,9 @@ uncurry | |||
26 | (\(f :: _) (g :: _) -> hlistNilCase _ (_rhs (HCons (a d) (HCons (b f) HNil))) g) | 39 | (\(f :: _) (g :: _) -> hlistNilCase _ (_rhs (HCons (a d) (HCons (b f) HNil))) g) |
27 | e) | 40 | e) |
28 | c | 41 | c |
42 | |||
29 | pi = _rhs 3.141592653589793 | 43 | pi = _rhs 3.141592653589793 |
44 | |||
30 | zip :: forall (a :: _) (b :: _) . [a] -> [b] -> [HList (a : b : '[])] | 45 | zip :: forall (a :: _) (b :: _) . [a] -> [b] -> [HList (a : b : '[])] |
31 | zip | 46 | zip |
32 | = \(a :: _) (b :: _) -> case'List | 47 | = \(a :: _) (b :: _) -> case'List |
@@ -38,6 +53,7 @@ zip | |||
38 | (\(e :: _) (f :: _) -> _rhs (HCons c (HCons e HNil) : zip d f)) | 53 | (\(e :: _) (f :: _) -> _rhs (HCons c (HCons e HNil) : zip d f)) |
39 | b) | 54 | b) |
40 | a | 55 | a |
56 | |||
41 | unzip | 57 | unzip |
42 | :: forall (a :: _) (b :: _) . [HList (a : b : '[])] -> HList ([a] : [b] : '[]) | 58 | :: forall (a :: _) (b :: _) . [HList (a : b : '[])] -> HList ([a] : [b] : '[]) |
43 | unzip | 59 | unzip |
@@ -70,6 +86,7 @@ unzip | |||
70 | e) | 86 | e) |
71 | b) | 87 | b) |
72 | a | 88 | a |
89 | |||
73 | filter | 90 | filter |
74 | = \(a :: _) (b :: _) -> case'List | 91 | = \(a :: _) (b :: _) -> case'List |
75 | (\_ -> _) | 92 | (\_ -> _) |
@@ -77,23 +94,28 @@ filter | |||
77 | (\(c :: _) (d :: _) -> _rhs | 94 | (\(c :: _) (d :: _) -> _rhs |
78 | ((\(e :: _) -> case'Bool (\_ -> _) (filter a d) (c : filter a d) e) (a c))) | 95 | ((\(e :: _) -> case'Bool (\_ -> _) (filter a d) (c : filter a d) e) (a c))) |
79 | b | 96 | b |
97 | |||
80 | tail :: forall (a :: _) . [a] -> [a] | 98 | tail :: forall (a :: _) . [a] -> [a] |
81 | tail | 99 | tail |
82 | = \(a :: _) -> case'List (\_ -> _) (_rhs undefined) (\_ (b :: _) -> _rhs b) a | 100 | = \(a :: _) -> case'List (\_ -> _) (_rhs undefined) (\_ (b :: _) -> _rhs b) a |
101 | |||
83 | pairs :: forall (a :: _) . [a] -> [HList (a : a : '[])] | 102 | pairs :: forall (a :: _) . [a] -> [HList (a : a : '[])] |
84 | pairs = \(a :: _) -> _rhs (zip a (tail a)) | 103 | pairs = \(a :: _) -> _rhs (zip a (tail a)) |
104 | |||
85 | foldl' | 105 | foldl' |
86 | = \(a :: _) (b :: _) (c :: _) -> case'List | 106 | = \(a :: _) (b :: _) (c :: _) -> case'List |
87 | (\_ -> _) | 107 | (\_ -> _) |
88 | (_rhs b) | 108 | (_rhs b) |
89 | (\(d :: _) (e :: _) -> _rhs (foldl' a (a b d) e)) | 109 | (\(d :: _) (e :: _) -> _rhs (foldl' a (a b d) e)) |
90 | c | 110 | c |
111 | |||
91 | foldr1 | 112 | foldr1 |
92 | = \(a :: _) (b :: _) -> case'List | 113 | = \(a :: _) (b :: _) -> case'List |
93 | (\_ -> _) | 114 | (\_ -> _) |
94 | (_rhs undefined) | 115 | (_rhs undefined) |
95 | (\(c :: _) (d :: _) -> _rhs (foldr a c d)) | 116 | (\(c :: _) (d :: _) -> _rhs (foldr a c d)) |
96 | b | 117 | b |
118 | |||
97 | split | 119 | split |
98 | = \(a :: _) -> case'List | 120 | = \(a :: _) -> case'List |
99 | (\_ -> _) | 121 | (\_ -> _) |
@@ -115,6 +137,7 @@ split | |||
115 | k) | 137 | k) |
116 | d)) -> HCons (b : e) (HCons f HNil)) | 138 | d)) -> HCons (b : e) (HCons f HNil)) |
117 | a | 139 | a |
140 | |||
118 | mergeBy | 141 | mergeBy |
119 | = \(a :: _) (b :: _) (c :: _) -> case'List | 142 | = \(a :: _) (b :: _) (c :: _) -> case'List |
120 | (\_ -> _) | 143 | (\_ -> _) |
@@ -132,6 +155,7 @@ mergeBy | |||
132 | (a d f))) | 155 | (a d f))) |
133 | c) | 156 | c) |
134 | b | 157 | b |
158 | |||
135 | sortBy | 159 | sortBy |
136 | = \(a :: _) (b :: _) -> case'List | 160 | = \(a :: _) (b :: _) -> case'List |
137 | (\_ -> _) | 161 | (\_ -> _) |
@@ -142,8 +166,10 @@ sortBy | |||
142 | (\_ _ -> _rhs (uncurry (mergeBy a) ((sortBy a *** sortBy a) (split b)))) | 166 | (\_ _ -> _rhs (uncurry (mergeBy a) ((sortBy a *** sortBy a) (split b)))) |
143 | d) | 167 | d) |
144 | b | 168 | b |
169 | |||
145 | iterate :: forall (a :: _) . (a -> a) -> a -> [a] | 170 | iterate :: forall (a :: _) . (a -> a) -> a -> [a] |
146 | iterate = \(a :: _) (b :: _) -> _rhs (b : iterate a (a b)) | 171 | iterate = \(a :: _) (b :: _) -> _rhs (b : iterate a (a b)) |
172 | |||
147 | fst | 173 | fst |
148 | = \(a :: _) -> hlistConsCase | 174 | = \(a :: _) -> hlistConsCase |
149 | _ | 175 | _ |
@@ -152,6 +178,7 @@ fst | |||
152 | (\_ (d :: _) -> hlistNilCase _ (_rhs b) d) | 178 | (\_ (d :: _) -> hlistNilCase _ (_rhs b) d) |
153 | c) | 179 | c) |
154 | a | 180 | a |
181 | |||
155 | snd | 182 | snd |
156 | = \(a :: _) -> hlistConsCase | 183 | = \(a :: _) -> hlistConsCase |
157 | _ | 184 | _ |
@@ -160,15 +187,23 @@ snd | |||
160 | (\(c :: _) (d :: _) -> hlistNilCase _ (_rhs c) d) | 187 | (\(c :: _) (d :: _) -> hlistNilCase _ (_rhs c) d) |
161 | b) | 188 | b) |
162 | a | 189 | a |
190 | |||
163 | (|||) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs b) (_rhs True) a | 191 | (|||) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs b) (_rhs True) a |
192 | |||
164 | infixr 2 ||| | 193 | infixr 2 ||| |
194 | |||
165 | (&&&) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs False) (_rhs b) a | 195 | (&&&) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs False) (_rhs b) a |
196 | |||
166 | infixr 3 &&& | 197 | infixr 3 &&& |
198 | |||
167 | data RecItem :: Type where | 199 | data RecItem :: Type where |
168 | RecItem :: String -> Type -> RecItem | 200 | RecItem :: String -> Type -> RecItem |
201 | |||
169 | recItemType = \(a :: _) -> case'RecItem (\_ -> _) (\_ (b :: _) -> _rhs b) a | 202 | recItemType = \(a :: _) -> case'RecItem (\_ -> _) (\_ (b :: _) -> _rhs b) a |
203 | |||
170 | data RecordC (_ :: [RecItem]) :: Type where | 204 | data RecordC (_ :: [RecItem]) :: Type where |
171 | RecordCons :: forall (a :: [RecItem]) . HList (map recItemType a) -> RecordC a | 205 | RecordCons :: forall (a :: [RecItem]) . HList (map recItemType a) -> RecordC a |
206 | |||
172 | isKeyC | 207 | isKeyC |
173 | = \(a :: _) (b :: _) (c :: _) -> case'List | 208 | = \(a :: _) (b :: _) (c :: _) -> case'List |
174 | (\_ -> _) | 209 | (\_ -> _) |
@@ -179,8 +214,11 @@ isKeyC | |||
179 | (primIfThenElse (a == f) (b `'EqCTt` g) (isKeyC a b e))) | 214 | (primIfThenElse (a == f) (b `'EqCTt` g) (isKeyC a b e))) |
180 | d) | 215 | d) |
181 | c | 216 | c |
217 | |||
182 | fstTup = _rhs (hlistConsCase (_ :: _) \(a :: _) _ -> a) | 218 | fstTup = _rhs (hlistConsCase (_ :: _) \(a :: _) _ -> a) |
219 | |||
183 | sndTup = _rhs (hlistConsCase (_ :: _) \_ (a :: _) -> a) | 220 | sndTup = _rhs (hlistConsCase (_ :: _) \_ (a :: _) -> a) |
221 | |||
184 | project | 222 | project |
185 | :: forall (a :: _) (b :: [RecItem]) | 223 | :: forall (a :: _) (b :: [RecItem]) |
186 | . forall (c :: String) -> isKeyC c a b => RecordC b -> a | 224 | . forall (c :: String) -> isKeyC c a b => RecordC b -> a |
@@ -207,156 +245,304 @@ project | |||
207 | d) | 245 | d) |
208 | e) | 246 | e) |
209 | b | 247 | b |
248 | |||
210 | rgb = \(a :: _) (b :: _) (c :: _) -> _rhs (V4 a b c 1.0) | 249 | rgb = \(a :: _) (b :: _) (c :: _) -> _rhs (V4 a b c 1.0) |
250 | |||
211 | black = _rhs (rgb 0.0 0.0 0.0) | 251 | black = _rhs (rgb 0.0 0.0 0.0) |
252 | |||
212 | gray = _rhs (rgb 0.5 0.5 0.5) | 253 | gray = _rhs (rgb 0.5 0.5 0.5) |
254 | |||
213 | silver = _rhs (rgb 0.75 0.75 0.75) | 255 | silver = _rhs (rgb 0.75 0.75 0.75) |
256 | |||
214 | white = _rhs (rgb 1.0 1.0 1.0) | 257 | white = _rhs (rgb 1.0 1.0 1.0) |
258 | |||
215 | maroon = _rhs (rgb 0.5 0.0 0.0) | 259 | maroon = _rhs (rgb 0.5 0.0 0.0) |
260 | |||
216 | red = _rhs (rgb 1.0 0.0 0.0) | 261 | red = _rhs (rgb 1.0 0.0 0.0) |
262 | |||
217 | olive = _rhs (rgb 0.5 0.5 0.0) | 263 | olive = _rhs (rgb 0.5 0.5 0.0) |
264 | |||
218 | yellow = _rhs (rgb 1.0 1.0 0.0) | 265 | yellow = _rhs (rgb 1.0 1.0 0.0) |
266 | |||
219 | green = _rhs (rgb 0.0 0.5 0.0) | 267 | green = _rhs (rgb 0.0 0.5 0.0) |
268 | |||
220 | lime = _rhs (rgb 0.0 1.0 0.0) | 269 | lime = _rhs (rgb 0.0 1.0 0.0) |
270 | |||
221 | teal = _rhs (rgb 0.0 0.5 0.5) | 271 | teal = _rhs (rgb 0.0 0.5 0.5) |
272 | |||
222 | aqua = _rhs (rgb 0.0 1.0 1.0) | 273 | aqua = _rhs (rgb 0.0 1.0 1.0) |
274 | |||
223 | navy = _rhs (rgb 0.0 0.0 0.5) | 275 | navy = _rhs (rgb 0.0 0.0 0.5) |
276 | |||
224 | blue = _rhs (rgb 0.0 0.0 1.0) | 277 | blue = _rhs (rgb 0.0 0.0 1.0) |
278 | |||
225 | purple = _rhs (rgb 0.5 0.0 0.5) | 279 | purple = _rhs (rgb 0.5 0.0 0.5) |
280 | |||
226 | fuchsia = _rhs (rgb 1.0 0.0 1.0) | 281 | fuchsia = _rhs (rgb 1.0 0.0 1.0) |
282 | |||
227 | colorImage1 = _rhs (ColorImage @(fromInt 1)) | 283 | colorImage1 = _rhs (ColorImage @(fromInt 1)) |
284 | |||
228 | colorImage2 = _rhs (ColorImage @(fromInt 2)) | 285 | colorImage2 = _rhs (ColorImage @(fromInt 2)) |
286 | |||
229 | depthImage1 = _rhs (DepthImage @(fromInt 1)) | 287 | depthImage1 = _rhs (DepthImage @(fromInt 1)) |
288 | |||
230 | v3FToV4F :: Vec (fromInt 3) Float -> Vec (fromInt 4) Float | 289 | v3FToV4F :: Vec (fromInt 3) Float -> Vec (fromInt 4) Float |
231 | v3FToV4F | 290 | v3FToV4F |
232 | = \(a :: _) -> _rhs | 291 | = \(a :: _) -> _rhs |
233 | (V4 (swizzscalar a Sx) (swizzscalar a Sy) (swizzscalar a Sz) (fromInt 1)) | 292 | (V4 (swizzscalar a Sx) (swizzscalar a Sy) (swizzscalar a Sz) (fromInt 1)) |
293 | |||
234 | radians = _rhs PrimRadians | 294 | radians = _rhs PrimRadians |
295 | |||
235 | degrees = _rhs PrimDegrees | 296 | degrees = _rhs PrimDegrees |
297 | |||
236 | sin = _rhs PrimSin | 298 | sin = _rhs PrimSin |
299 | |||
237 | cos = _rhs PrimCos | 300 | cos = _rhs PrimCos |
301 | |||
238 | tan = _rhs PrimTan | 302 | tan = _rhs PrimTan |
303 | |||
239 | sinh = _rhs PrimSinH | 304 | sinh = _rhs PrimSinH |
305 | |||
240 | cosh = _rhs PrimCosH | 306 | cosh = _rhs PrimCosH |
307 | |||
241 | tanh = _rhs PrimTanH | 308 | tanh = _rhs PrimTanH |
309 | |||
242 | asin = _rhs PrimASin | 310 | asin = _rhs PrimASin |
311 | |||
243 | asinh = _rhs PrimASinH | 312 | asinh = _rhs PrimASinH |
313 | |||
244 | acos = _rhs PrimACos | 314 | acos = _rhs PrimACos |
315 | |||
245 | acosh = _rhs PrimACosH | 316 | acosh = _rhs PrimACosH |
317 | |||
246 | atan = _rhs PrimATan | 318 | atan = _rhs PrimATan |
319 | |||
247 | atanh = _rhs PrimATanH | 320 | atanh = _rhs PrimATanH |
321 | |||
248 | atan2 = _rhs PrimATan2 | 322 | atan2 = _rhs PrimATan2 |
323 | |||
249 | pow = _rhs PrimPow | 324 | pow = _rhs PrimPow |
325 | |||
250 | exp = _rhs PrimExp | 326 | exp = _rhs PrimExp |
327 | |||
251 | log = _rhs PrimLog | 328 | log = _rhs PrimLog |
329 | |||
252 | exp2 = _rhs PrimExp2 | 330 | exp2 = _rhs PrimExp2 |
331 | |||
253 | log2 = _rhs PrimLog2 | 332 | log2 = _rhs PrimLog2 |
333 | |||
254 | sqrt = _rhs PrimSqrt | 334 | sqrt = _rhs PrimSqrt |
335 | |||
255 | inversesqrt = _rhs PrimInvSqrt | 336 | inversesqrt = _rhs PrimInvSqrt |
337 | |||
256 | abs = _rhs PrimAbs | 338 | abs = _rhs PrimAbs |
339 | |||
257 | sign = _rhs PrimSign | 340 | sign = _rhs PrimSign |
341 | |||
258 | floor = _rhs PrimFloor | 342 | floor = _rhs PrimFloor |
343 | |||
259 | trunc = _rhs PrimTrunc | 344 | trunc = _rhs PrimTrunc |
345 | |||
260 | round = _rhs PrimRound | 346 | round = _rhs PrimRound |
347 | |||
261 | roundEven = _rhs PrimRoundEven | 348 | roundEven = _rhs PrimRoundEven |
349 | |||
262 | ceil = _rhs PrimCeil | 350 | ceil = _rhs PrimCeil |
351 | |||
263 | fract = _rhs PrimFract | 352 | fract = _rhs PrimFract |
353 | |||
264 | mod = _rhs PrimMod | 354 | mod = _rhs PrimMod |
355 | |||
265 | min = _rhs PrimMin | 356 | min = _rhs PrimMin |
357 | |||
266 | max = _rhs PrimMax | 358 | max = _rhs PrimMax |
359 | |||
267 | modF = _rhs PrimModF | 360 | modF = _rhs PrimModF |
361 | |||
268 | clamp = _rhs PrimClamp | 362 | clamp = _rhs PrimClamp |
363 | |||
269 | clampS = _rhs PrimClampS | 364 | clampS = _rhs PrimClampS |
365 | |||
270 | mix = _rhs PrimMix | 366 | mix = _rhs PrimMix |
367 | |||
271 | mixS = _rhs PrimMixS | 368 | mixS = _rhs PrimMixS |
369 | |||
272 | mixB = _rhs PrimMixB | 370 | mixB = _rhs PrimMixB |
371 | |||
273 | step = _rhs PrimStep | 372 | step = _rhs PrimStep |
373 | |||
274 | stepS = _rhs PrimStepS | 374 | stepS = _rhs PrimStepS |
375 | |||
275 | smoothstep = _rhs PrimSmoothStep | 376 | smoothstep = _rhs PrimSmoothStep |
377 | |||
276 | smoothstepS = _rhs PrimSmoothStepS | 378 | smoothstepS = _rhs PrimSmoothStepS |
379 | |||
277 | isNan = _rhs PrimIsNan | 380 | isNan = _rhs PrimIsNan |
381 | |||
278 | isInf = _rhs PrimIsInf | 382 | isInf = _rhs PrimIsInf |
383 | |||
279 | dFdx = _rhs PrimDFdx | 384 | dFdx = _rhs PrimDFdx |
385 | |||
280 | dFdy = _rhs PrimDFdy | 386 | dFdy = _rhs PrimDFdy |
387 | |||
281 | fWidth = _rhs PrimFWidth | 388 | fWidth = _rhs PrimFWidth |
389 | |||
282 | noise1 = _rhs PrimNoise1 | 390 | noise1 = _rhs PrimNoise1 |
391 | |||
283 | noise2 = _rhs PrimNoise2 | 392 | noise2 = _rhs PrimNoise2 |
393 | |||
284 | noise3 = _rhs PrimNoise3 | 394 | noise3 = _rhs PrimNoise3 |
395 | |||
285 | noise4 = _rhs PrimNoise4 | 396 | noise4 = _rhs PrimNoise4 |
397 | |||
286 | length = _rhs PrimLength | 398 | length = _rhs PrimLength |
399 | |||
287 | distance = _rhs PrimDistance | 400 | distance = _rhs PrimDistance |
401 | |||
288 | dot = _rhs PrimDot | 402 | dot = _rhs PrimDot |
403 | |||
289 | cross = _rhs PrimCross | 404 | cross = _rhs PrimCross |
405 | |||
290 | normalize = _rhs PrimNormalize | 406 | normalize = _rhs PrimNormalize |
407 | |||
291 | faceforward = _rhs PrimFaceForward | 408 | faceforward = _rhs PrimFaceForward |
409 | |||
292 | reflect = _rhs PrimReflect | 410 | reflect = _rhs PrimReflect |
411 | |||
293 | refract = _rhs PrimRefract | 412 | refract = _rhs PrimRefract |
413 | |||
294 | transpose = _rhs PrimTranspose | 414 | transpose = _rhs PrimTranspose |
415 | |||
295 | det = _rhs PrimDeterminant | 416 | det = _rhs PrimDeterminant |
417 | |||
296 | inv = _rhs PrimInverse | 418 | inv = _rhs PrimInverse |
419 | |||
297 | outer = _rhs PrimOuterProduct | 420 | outer = _rhs PrimOuterProduct |
421 | |||
298 | bAnd = _rhs PrimBAnd | 422 | bAnd = _rhs PrimBAnd |
423 | |||
299 | bOr = _rhs PrimBOr | 424 | bOr = _rhs PrimBOr |
425 | |||
300 | bXor = _rhs PrimBXor | 426 | bXor = _rhs PrimBXor |
427 | |||
301 | bNot = _rhs PrimBNot | 428 | bNot = _rhs PrimBNot |
429 | |||
302 | bAndS = _rhs PrimBAndS | 430 | bAndS = _rhs PrimBAndS |
431 | |||
303 | bOrS = _rhs PrimBOrS | 432 | bOrS = _rhs PrimBOrS |
433 | |||
304 | bXorS = _rhs PrimBXorS | 434 | bXorS = _rhs PrimBXorS |
435 | |||
305 | shiftL = _rhs PrimBShiftL | 436 | shiftL = _rhs PrimBShiftL |
437 | |||
306 | shiftR = _rhs PrimBShiftR | 438 | shiftR = _rhs PrimBShiftR |
439 | |||
307 | shiftLS = _rhs PrimBShiftLS | 440 | shiftLS = _rhs PrimBShiftLS |
441 | |||
308 | shiftRS = _rhs PrimBShiftRS | 442 | shiftRS = _rhs PrimBShiftRS |
443 | |||
309 | floatBitsToInt = _rhs PrimFloatBitsToInt | 444 | floatBitsToInt = _rhs PrimFloatBitsToInt |
445 | |||
310 | floatBitsToWord = _rhs PrimFloatBitsToUInt | 446 | floatBitsToWord = _rhs PrimFloatBitsToUInt |
447 | |||
311 | intBitsToFloat = _rhs PrimIntBitsToFloat | 448 | intBitsToFloat = _rhs PrimIntBitsToFloat |
449 | |||
312 | wordBitsToFloat = _rhs PrimUIntBitsToFloat | 450 | wordBitsToFloat = _rhs PrimUIntBitsToFloat |
451 | |||
313 | infixl 7 * | 452 | infixl 7 * |
453 | |||
314 | infixl 7 / | 454 | infixl 7 / |
455 | |||
315 | infixl 7 % | 456 | infixl 7 % |
457 | |||
316 | infixl 6 + | 458 | infixl 6 + |
459 | |||
317 | infixl 6 - | 460 | infixl 6 - |
461 | |||
318 | infix 4 /= | 462 | infix 4 /= |
463 | |||
319 | infix 4 < | 464 | infix 4 < |
465 | |||
320 | infix 4 <= | 466 | infix 4 <= |
467 | |||
321 | infix 4 >= | 468 | infix 4 >= |
469 | |||
322 | infix 4 > | 470 | infix 4 > |
471 | |||
323 | infixr 3 && | 472 | infixr 3 && |
473 | |||
324 | infixr 2 || | 474 | infixr 2 || |
475 | |||
325 | infix 7 dot | 476 | infix 7 dot |
477 | |||
326 | infix 7 cross | 478 | infix 7 cross |
479 | |||
327 | infixr 7 *. | 480 | infixr 7 *. |
481 | |||
328 | infixl 7 .* | 482 | infixl 7 .* |
483 | |||
329 | infixl 7 .*. | 484 | infixl 7 .*. |
485 | |||
330 | (+) = \(a :: _) (b :: _) -> _rhs (PrimAdd a b) | 486 | (+) = \(a :: _) (b :: _) -> _rhs (PrimAdd a b) |
487 | |||
331 | (-) = \(a :: _) (b :: _) -> _rhs (PrimSub a b) | 488 | (-) = \(a :: _) (b :: _) -> _rhs (PrimSub a b) |
489 | |||
332 | (*) = \(a :: _) (b :: _) -> _rhs (PrimMul a b) | 490 | (*) = \(a :: _) (b :: _) -> _rhs (PrimMul a b) |
491 | |||
333 | (/) = \(a :: _) (b :: _) -> _rhs (PrimDiv a b) | 492 | (/) = \(a :: _) (b :: _) -> _rhs (PrimDiv a b) |
493 | |||
334 | (%) = \(a :: _) (b :: _) -> _rhs (PrimMod a b) | 494 | (%) = \(a :: _) (b :: _) -> _rhs (PrimMod a b) |
495 | |||
335 | neg = \(a :: _) -> _rhs (PrimNeg a) | 496 | neg = \(a :: _) -> _rhs (PrimNeg a) |
497 | |||
336 | (/=) = \(a :: _) (b :: _) -> _rhs (PrimNotEqual a b) | 498 | (/=) = \(a :: _) (b :: _) -> _rhs (PrimNotEqual a b) |
499 | |||
337 | (<) = \(a :: _) (b :: _) -> _rhs (PrimLessThan a b) | 500 | (<) = \(a :: _) (b :: _) -> _rhs (PrimLessThan a b) |
501 | |||
338 | (<=) = \(a :: _) (b :: _) -> _rhs (PrimLessThanEqual a b) | 502 | (<=) = \(a :: _) (b :: _) -> _rhs (PrimLessThanEqual a b) |
503 | |||
339 | (>=) = \(a :: _) (b :: _) -> _rhs (PrimGreaterThanEqual a b) | 504 | (>=) = \(a :: _) (b :: _) -> _rhs (PrimGreaterThanEqual a b) |
505 | |||
340 | (>) = \(a :: _) (b :: _) -> _rhs (PrimGreaterThan a b) | 506 | (>) = \(a :: _) (b :: _) -> _rhs (PrimGreaterThan a b) |
507 | |||
341 | (&&) = \(a :: _) (b :: _) -> _rhs (PrimAnd a b) | 508 | (&&) = \(a :: _) (b :: _) -> _rhs (PrimAnd a b) |
509 | |||
342 | (||) = \(a :: _) (b :: _) -> _rhs (PrimOr a b) | 510 | (||) = \(a :: _) (b :: _) -> _rhs (PrimOr a b) |
511 | |||
343 | xor = _rhs PrimXor | 512 | xor = _rhs PrimXor |
513 | |||
344 | not = \(a :: _) -> _rhs (PrimNot a) | 514 | not = \(a :: _) -> _rhs (PrimNot a) |
515 | |||
345 | any = \(a :: _) -> _rhs (PrimAny a) | 516 | any = \(a :: _) -> _rhs (PrimAny a) |
517 | |||
346 | all = \(a :: _) -> _rhs (PrimAll a) | 518 | all = \(a :: _) -> _rhs (PrimAll a) |
519 | |||
347 | (.*.) = \(a :: _) (b :: _) -> _rhs (PrimMulMatMat a b) | 520 | (.*.) = \(a :: _) (b :: _) -> _rhs (PrimMulMatMat a b) |
521 | |||
348 | (*.) = \(a :: _) (b :: _) -> _rhs (PrimMulMatVec a b) | 522 | (*.) = \(a :: _) (b :: _) -> _rhs (PrimMulMatVec a b) |
523 | |||
349 | (.*) = \(a :: _) (b :: _) -> _rhs (PrimMulVecMat a b) | 524 | (.*) = \(a :: _) (b :: _) -> _rhs (PrimMulVecMat a b) |
525 | |||
350 | infixl 7 *! | 526 | infixl 7 *! |
527 | |||
351 | infixl 7 /! | 528 | infixl 7 /! |
529 | |||
352 | infixl 7 %! | 530 | infixl 7 %! |
531 | |||
353 | infixl 6 +! | 532 | infixl 6 +! |
533 | |||
354 | infixl 6 -! | 534 | infixl 6 -! |
535 | |||
355 | (+!) = \(a :: _) (b :: _) -> _rhs (PrimAddS a b) | 536 | (+!) = \(a :: _) (b :: _) -> _rhs (PrimAddS a b) |
537 | |||
356 | (-!) = \(a :: _) (b :: _) -> _rhs (PrimSubS a b) | 538 | (-!) = \(a :: _) (b :: _) -> _rhs (PrimSubS a b) |
539 | |||
357 | (*!) = \(a :: _) (b :: _) -> _rhs (PrimMulS a b) | 540 | (*!) = \(a :: _) (b :: _) -> _rhs (PrimMulS a b) |
541 | |||
358 | (/!) = \(a :: _) (b :: _) -> _rhs (PrimDivS a b) | 542 | (/!) = \(a :: _) (b :: _) -> _rhs (PrimDivS a b) |
543 | |||
359 | (%!) = \(a :: _) (b :: _) -> _rhs (PrimModS a b) | 544 | (%!) = \(a :: _) (b :: _) -> _rhs (PrimModS a b) |
545 | |||
360 | perspective | 546 | perspective |
361 | :: Float -> Float -> Float -> Float -> Mat (fromInt 4) (fromInt 4) Float | 547 | :: Float -> Float -> Float -> Float -> Mat (fromInt 4) (fromInt 4) Float |
362 | perspective | 548 | perspective |
@@ -376,6 +562,7 @@ perspective | |||
376 | (fromInt 0) | 562 | (fromInt 0) |
377 | (fromInt 0 - fromInt 2 * b * a / (b - a)) | 563 | (fromInt 0 - fromInt 2 * b * a / (b - a)) |
378 | (fromInt 0)) | 564 | (fromInt 0)) |
565 | |||
379 | rotMatrixZ | 566 | rotMatrixZ |
380 | = \(a :: _) -> _rhs | 567 | = \(a :: _) -> _rhs |
381 | \(b := _rhs (cos a)) (c := _rhs (sin a)) -> M44F | 568 | \(b := _rhs (cos a)) (c := _rhs (sin a)) -> M44F |
@@ -383,6 +570,7 @@ rotMatrixZ | |||
383 | (V4 (fromInt 0 - c) b (fromInt 0) (fromInt 0)) | 570 | (V4 (fromInt 0 - c) b (fromInt 0) (fromInt 0)) |
384 | (V4 (fromInt 0) (fromInt 0) (fromInt 1) (fromInt 0)) | 571 | (V4 (fromInt 0) (fromInt 0) (fromInt 1) (fromInt 0)) |
385 | (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1)) | 572 | (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1)) |
573 | |||
386 | rotMatrixY | 574 | rotMatrixY |
387 | = \(a :: _) -> _rhs | 575 | = \(a :: _) -> _rhs |
388 | \(b := _rhs (cos a)) (c := _rhs (sin a)) -> M44F | 576 | \(b := _rhs (cos a)) (c := _rhs (sin a)) -> M44F |
@@ -390,6 +578,7 @@ rotMatrixY | |||
390 | (V4 (fromInt 0) (fromInt 1) (fromInt 0) (fromInt 0)) | 578 | (V4 (fromInt 0) (fromInt 1) (fromInt 0) (fromInt 0)) |
391 | (V4 c (fromInt 0) b (fromInt 0)) | 579 | (V4 c (fromInt 0) b (fromInt 0)) |
392 | (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1)) | 580 | (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1)) |
581 | |||
393 | rotMatrixX | 582 | rotMatrixX |
394 | = \(a :: _) -> _rhs | 583 | = \(a :: _) -> _rhs |
395 | \(b := _rhs (cos a)) (c := _rhs (sin a)) -> M44F | 584 | \(b := _rhs (cos a)) (c := _rhs (sin a)) -> M44F |
@@ -397,9 +586,11 @@ rotMatrixX | |||
397 | (V4 (fromInt 0) b c (fromInt 0)) | 586 | (V4 (fromInt 0) b c (fromInt 0)) |
398 | (V4 (fromInt 0) (fromInt 0 - c) b (fromInt 0)) | 587 | (V4 (fromInt 0) (fromInt 0 - c) b (fromInt 0)) |
399 | (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1)) | 588 | (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1)) |
589 | |||
400 | rotationEuler | 590 | rotationEuler |
401 | = \(a :: _) (b :: _) (c :: _) -> _rhs | 591 | = \(a :: _) (b :: _) (c :: _) -> _rhs |
402 | (rotMatrixY a .*. rotMatrixX b .*. rotMatrixZ c) | 592 | (rotMatrixY a .*. rotMatrixX b .*. rotMatrixZ c) |
593 | |||
403 | translateBefore4 :: Vec (fromInt 3) Float -> Mat (fromInt 4) (fromInt 4) Float | 594 | translateBefore4 :: Vec (fromInt 3) Float -> Mat (fromInt 4) (fromInt 4) Float |
404 | translateBefore4 | 595 | translateBefore4 |
405 | = \(a :: _) -> _rhs | 596 | = \(a :: _) -> _rhs |
@@ -413,6 +604,7 @@ translateBefore4 | |||
413 | (swizzscalar a Sy) | 604 | (swizzscalar a Sy) |
414 | (swizzscalar a Sz) | 605 | (swizzscalar a Sz) |
415 | (fromInt 1))) -> M44F b c d e | 606 | (fromInt 1))) -> M44F b c d e |
607 | |||
416 | lookat | 608 | lookat |
417 | :: Vec (fromInt 3) Float | 609 | :: Vec (fromInt 3) Float |
418 | -> Vec (fromInt 3) Float | 610 | -> Vec (fromInt 3) Float |
@@ -434,7 +626,9 @@ lookat | |||
434 | (d e) | 626 | (d e) |
435 | (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1)))) -> h | 627 | (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1)))) -> h |
436 | .*. translateBefore4 (neg a) | 628 | .*. translateBefore4 (neg a) |
629 | |||
437 | scale = \(a :: _) (b :: _) -> _rhs (b * V4 a a a 1.0) | 630 | scale = \(a :: _) (b :: _) -> _rhs (b * V4 a a a 1.0) |
631 | |||
438 | fromTo :: Float -> Float -> [Float] | 632 | fromTo :: Float -> Float -> [Float] |
439 | fromTo | 633 | fromTo |
440 | = \(a :: _) (b :: _) -> case'Bool | 634 | = \(a :: _) (b :: _) -> case'Bool |
@@ -442,6 +636,7 @@ fromTo | |||
442 | (_rhs (a : fromTo (a + fromInt 1) b)) | 636 | (_rhs (a : fromTo (a + fromInt 1) b)) |
443 | (_rhs []) | 637 | (_rhs []) |
444 | (a > b) | 638 | (a > b) |
639 | |||
445 | (!!) :: forall (a :: _) . [a] -> Int -> a | 640 | (!!) :: forall (a :: _) . [a] -> Int -> a |
446 | (!!) | 641 | (!!) |
447 | = \(a :: _) (b :: _) -> case'List | 642 | = \(a :: _) (b :: _) -> case'List |
@@ -453,7 +648,6 @@ fromTo | |||
453 | (_rhs c) | 648 | (_rhs c) |
454 | (fromInt 0 == b)) | 649 | (fromInt 0 == b)) |
455 | a | 650 | a |
456 | main is not found | ||
457 | ------------ trace | 651 | ------------ trace |
458 | const :: forall a b . a -> b -> a | 652 | const :: forall a b . a -> b -> a |
459 | otherwise :: Bool | 653 | otherwise :: Bool |
diff --git a/testdata/SampleMaterial.out b/testdata/SampleMaterial.out index 91701a48..d0bc2e7d 100644 --- a/testdata/SampleMaterial.out +++ b/testdata/SampleMaterial.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | sampleMaterial | 3 | sampleMaterial |
3 | = _rhs | 4 | = _rhs |
@@ -2076,7 +2077,6 @@ sampleMaterial | |||
2076 | False) | 2077 | False) |
2077 | HNil) | 2078 | HNil) |
2078 | : []) | 2079 | : []) |
2079 | main is not found | ||
2080 | ------------ trace | 2080 | ------------ trace |
2081 | sampleMaterial :: [(String, CommonAttrs)] | 2081 | sampleMaterial :: [(String, CommonAttrs)] |
2082 | ------------ tooltips | 2082 | ------------ tooltips |
diff --git a/testdata/ambig.out b/testdata/ambig.out index ce1a76fb..53770b84 100644 --- a/testdata/ambig.out +++ b/testdata/ambig.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | h | 3 | h |
3 | = \(a :: _) (b :: _) _ -> _rhs | 4 | = \(a :: _) (b :: _) _ -> _rhs |
@@ -11,7 +12,6 @@ h | |||
11 | f) | 12 | f) |
12 | d) | 13 | d) |
13 | b)) -> c | 14 | b)) -> c |
14 | main is not found | ||
15 | ------------ trace | 15 | ------------ trace |
16 | h :: forall a b c d . (b -> d -> c) -> (b, d) -> a -> c | 16 | h :: forall a b c d . (b -> d -> c) -> (b, d) -> a -> c |
17 | ------------ tooltips | 17 | ------------ tooltips |
diff --git a/testdata/complex.out b/testdata/complex.out index 1ae39c8d..18a95a8c 100644 --- a/testdata/complex.out +++ b/testdata/complex.out | |||
@@ -1,15 +1,21 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | data Repr :: Type where | 3 | data Repr :: Type where |
3 | Normal :: Repr | 4 | Normal :: Repr |
4 | Polar :: Repr | 5 | Polar :: Repr |
6 | |||
5 | data Complex :: Repr -> Type where | 7 | data Complex :: Repr -> Type where |
6 | Complex :: forall (a :: _) . Float -> Float -> Complex a | 8 | Complex :: forall (a :: _) . Float -> Float -> Complex a |
9 | |||
7 | repr :: forall (a :: _) . Complex a -> Repr | 10 | repr :: forall (a :: _) . Complex a -> Repr |
8 | repr = \ @(a :: _) _ -> _rhs a | 11 | repr = \ @(a :: _) _ -> _rhs a |
12 | |||
9 | normal :: Float -> Float -> Complex Normal | 13 | normal :: Float -> Float -> Complex Normal |
10 | normal = \(a :: _) (b :: _) -> _rhs (Complex a b) | 14 | normal = \(a :: _) (b :: _) -> _rhs (Complex a b) |
15 | |||
11 | polar :: Float -> Float -> Complex Polar | 16 | polar :: Float -> Float -> Complex Polar |
12 | polar = \(a :: _) (b :: _) -> _rhs (Complex a b) | 17 | polar = \(a :: _) (b :: _) -> _rhs (Complex a b) |
18 | |||
13 | cabs :: forall (a :: _) . Complex a -> Float | 19 | cabs :: forall (a :: _) . Complex a -> Float |
14 | cabs | 20 | cabs |
15 | = \ @(a :: _) (b :: _) -> case'Repr | 21 | = \ @(a :: _) (b :: _) -> case'Repr |
@@ -17,6 +23,7 @@ cabs | |||
17 | (case'Complex (\_ _ -> _) (\(c :: _) (d :: _) -> _rhs (sqrt (c * c + d * d))) b) | 23 | (case'Complex (\_ _ -> _) (\(c :: _) (d :: _) -> _rhs (sqrt (c * c + d * d))) b) |
18 | (case'Complex (\_ _ -> _) (\(e :: _) _ -> _rhs e) b) | 24 | (case'Complex (\_ _ -> _) (\(e :: _) _ -> _rhs e) b) |
19 | a | 25 | a |
26 | |||
20 | toPolar :: Complex Normal -> Complex Polar | 27 | toPolar :: Complex Normal -> Complex Polar |
21 | toPolar | 28 | toPolar |
22 | = \(a :: _) -> case'Complex | 29 | = \(a :: _) -> case'Complex |
@@ -39,13 +46,16 @@ toPolar | |||
39 | (polar d (fromInt 0 - pi / 2.0)) | 46 | (polar d (fromInt 0 - pi / 2.0)) |
40 | undefined))))) | 47 | undefined))))) |
41 | a | 48 | a |
49 | |||
42 | toNormal :: Complex Polar -> Complex Normal | 50 | toNormal :: Complex Polar -> Complex Normal |
43 | toNormal | 51 | toNormal |
44 | = \(a :: _) -> case'Complex | 52 | = \(a :: _) -> case'Complex |
45 | (\_ _ -> _) | 53 | (\_ _ -> _) |
46 | (\(b :: _) (c :: _) -> _rhs (Complex (b * cos c) (b * sin c))) | 54 | (\(b :: _) (c :: _) -> _rhs (Complex (b * cos c) (b * sin c))) |
47 | a | 55 | a |
56 | |||
48 | it_should_fail = \(a :: _) -> case'Complex (\_ _ -> _) (\(b :: _) _ -> _rhs b) a | 57 | it_should_fail = \(a :: _) -> case'Complex (\_ _ -> _) (\(b :: _) _ -> _rhs b) a |
58 | |||
49 | add :: forall (a :: _) (b :: _) . Complex a -> Complex b -> Complex a | 59 | add :: forall (a :: _) (b :: _) . Complex a -> Complex b -> Complex a |
50 | add | 60 | add |
51 | = \ @(a :: _) @(b :: _) (c :: _) (d :: _) -> case'Repr | 61 | = \ @(a :: _) @(b :: _) (c :: _) (d :: _) -> case'Repr |
@@ -63,6 +73,7 @@ add | |||
63 | b) | 73 | b) |
64 | (_rhs undefined) | 74 | (_rhs undefined) |
65 | a | 75 | a |
76 | |||
66 | mul :: forall (a :: _) (b :: _) . Complex a -> Complex b -> Complex a | 77 | mul :: forall (a :: _) (b :: _) . Complex a -> Complex b -> Complex a |
67 | mul | 78 | mul |
68 | = \ @(a :: _) @(b :: _) (c :: _) (d :: _) -> case'Repr | 79 | = \ @(a :: _) @(b :: _) (c :: _) (d :: _) -> case'Repr |
@@ -80,12 +91,15 @@ mul | |||
80 | b) | 91 | b) |
81 | (_rhs undefined) | 92 | (_rhs undefined) |
82 | a | 93 | a |
94 | |||
83 | s :: forall (a :: _) . Complex a -> Complex a | 95 | s :: forall (a :: _) . Complex a -> Complex a |
84 | s = \(a :: _) -> _rhs (mul a a `add` a) | 96 | s = \(a :: _) -> _rhs (mul a a `add` a) |
97 | |||
85 | s4 = \(a :: _) -> _rhs (s (s (s (s a)))) | 98 | s4 = \(a :: _) -> _rhs (s (s (s (s a)))) |
99 | |||
86 | iter = _rhs s4 | 100 | iter = _rhs s4 |
101 | |||
87 | mandel = \(a :: _) -> _rhs (cabs (iter a) < 2.0) | 102 | mandel = \(a :: _) -> _rhs (cabs (iter a) < 2.0) |
88 | main is not found | ||
89 | ------------ trace | 103 | ------------ trace |
90 | 'Repr :: Type | 104 | 'Repr :: Type |
91 | Normal :: Repr | 105 | Normal :: Repr |
diff --git a/testdata/data.out b/testdata/data.out index d1952aed..1f6a592f 100644 --- a/testdata/data.out +++ b/testdata/data.out | |||
@@ -1,13 +1,17 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | data Data0 :: Type where | 3 | data Data0 :: Type where |
3 | Data0 :: Data0 | 4 | Data0 :: Data0 |
5 | |||
4 | data Data1 (_ :: Type) (_ :: Type) (_ :: Type) :: Type where | 6 | data Data1 (_ :: Type) (_ :: Type) (_ :: Type) :: Type where |
5 | Data1 :: forall a b c . a -> b -> c -> Data1 a b c | 7 | Data1 :: forall a b c . a -> b -> c -> Data1 a b c |
8 | |||
6 | data Data2 :: Type where | 9 | data Data2 :: Type where |
7 | Data21 :: Int -> Data2 | 10 | Data21 :: Int -> Data2 |
8 | Data22 :: Int -> Int -> Data2 | 11 | Data22 :: Int -> Int -> Data2 |
9 | Data23 :: Int -> Data2 | 12 | Data23 :: Int -> Data2 |
10 | Data24 :: Data2 | 13 | Data24 :: Data2 |
14 | |||
11 | x | 15 | x |
12 | = \(a :: _) -> case'Data2 | 16 | = \(a :: _) -> case'Data2 |
13 | (\_ -> _) | 17 | (\_ -> _) |
@@ -16,6 +20,7 @@ x | |||
16 | (\(c :: _) -> _rhs c) | 20 | (\(c :: _) -> _rhs c) |
17 | (_rhs undefined) | 21 | (_rhs undefined) |
18 | a | 22 | a |
23 | |||
19 | y | 24 | y |
20 | = \(a :: _) -> case'Data2 | 25 | = \(a :: _) -> case'Data2 |
21 | (\_ -> _) | 26 | (\_ -> _) |
@@ -24,10 +29,12 @@ y | |||
24 | (\_ -> _rhs undefined) | 29 | (\_ -> _rhs undefined) |
25 | (_rhs undefined) | 30 | (_rhs undefined) |
26 | a | 31 | a |
32 | |||
27 | data Data5 (_ :: Type) (_ :: Type) (_ :: Type) :: Type where | 33 | data Data5 (_ :: Type) (_ :: Type) (_ :: Type) :: Type where |
28 | Data51 :: forall a b c . a -> Data5 a b c | 34 | Data51 :: forall a b c . a -> Data5 a b c |
29 | Data52 :: forall d e f . d -> e -> f -> Data5 d e f | 35 | Data52 :: forall d e f . d -> e -> f -> Data5 d e f |
30 | Data53 :: forall g h i . Int -> g -> Float -> h -> i -> Data5 g h i | 36 | Data53 :: forall g h i . Int -> g -> Float -> h -> i -> Data5 g h i |
37 | |||
31 | a5 | 38 | a5 |
32 | = \(a :: _) -> case'Data5 | 39 | = \(a :: _) -> case'Data5 |
33 | (\_ -> _) | 40 | (\_ -> _) |
@@ -35,6 +42,7 @@ a5 | |||
35 | (\(c :: _) _ _ -> _rhs c) | 42 | (\(c :: _) _ _ -> _rhs c) |
36 | (\_ _ _ _ _ -> _rhs undefined) | 43 | (\_ _ _ _ _ -> _rhs undefined) |
37 | a | 44 | a |
45 | |||
38 | b5 | 46 | b5 |
39 | = \(a :: _) -> case'Data5 | 47 | = \(a :: _) -> case'Data5 |
40 | (\_ -> _) | 48 | (\_ -> _) |
@@ -42,6 +50,7 @@ b5 | |||
42 | (\_ (b :: _) _ -> _rhs b) | 50 | (\_ (b :: _) _ -> _rhs b) |
43 | (\_ _ _ _ _ -> _rhs undefined) | 51 | (\_ _ _ _ _ -> _rhs undefined) |
44 | a | 52 | a |
53 | |||
45 | c5 | 54 | c5 |
46 | = \(a :: _) -> case'Data5 | 55 | = \(a :: _) -> case'Data5 |
47 | (\_ -> _) | 56 | (\_ -> _) |
@@ -49,7 +58,6 @@ c5 | |||
49 | (\_ _ (b :: _) -> _rhs b) | 58 | (\_ _ (b :: _) -> _rhs b) |
50 | (\_ _ _ _ _ -> _rhs undefined) | 59 | (\_ _ _ _ _ -> _rhs undefined) |
51 | a | 60 | a |
52 | main is not found | ||
53 | ------------ trace | 61 | ------------ trace |
54 | 'Data0 :: Type | 62 | 'Data0 :: Type |
55 | Data0 :: Data0 | 63 | Data0 :: Data0 |
diff --git a/testdata/empty.out b/testdata/empty.out index 41c61ca7..4cf07220 100644 --- a/testdata/empty.out +++ b/testdata/empty.out | |||
@@ -1,7 +1,7 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | data Empty :: Type where | 3 | data Empty :: Type where |
3 | 4 | ||
4 | main is not found | ||
5 | ------------ trace | 5 | ------------ trace |
6 | 'Empty :: Type | 6 | 'Empty :: Type |
7 | case'Empty :: forall (a :: Empty -> Type) (b :: Empty) -> a b | 7 | case'Empty :: forall (a :: Empty -> Type) (b :: Empty) -> a b |
diff --git a/testdata/id.out b/testdata/id.out index 3273b516..b087590c 100644 --- a/testdata/id.out +++ b/testdata/id.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | main' = _rhs \(a := _rhs \(b :: _) -> b) -> HCons (a 4.0) (HCons (a True) HNil) | 3 | main' = _rhs \(a := _rhs \(b :: _) -> b) -> HCons (a 4.0) (HCons (a True) HNil) |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | main' :: (Float, Bool) | 5 | main' :: (Float, Bool) |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/instantiate.out b/testdata/instantiate.out index e6746d48..66d45bf7 100644 --- a/testdata/instantiate.out +++ b/testdata/instantiate.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | main' = _rhs \(a := _rhs PrimAdd) -> a (V2 1.0 2.0) (V2 1.0 2.0) | 3 | main' = _rhs \(a := _rhs PrimAdd) -> a (V2 1.0 2.0) (V2 1.0 2.0) |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | main' :: VecS Float 2 | 5 | main' :: VecS Float 2 |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-list/list01.out b/testdata/language-features/basic-list/list01.out index 5df5b1a0..41b1f057 100644 --- a/testdata/language-features/basic-list/list01.out +++ b/testdata/language-features/basic-list/list01.out | |||
@@ -1,8 +1,10 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 = _rhs [] | 3 | value1 = _rhs [] |
4 | |||
3 | value2 = _rhs (fromInt 1 : fromInt 2 : fromInt 3 : fromInt 4 : []) | 5 | value2 = _rhs (fromInt 1 : fromInt 2 : fromInt 3 : fromInt 4 : []) |
6 | |||
4 | value3 = _rhs ('h' : 'e' : 'l' : 'l' : 'o' : []) | 7 | value3 = _rhs ('h' : 'e' : 'l' : 'l' : 'o' : []) |
5 | main is not found | ||
6 | ------------ trace | 8 | ------------ trace |
7 | value1 :: forall a . [a] | 9 | value1 :: forall a . [a] |
8 | value2 :: forall a . Num a => [a] | 10 | value2 :: forall a . Num a => [a] |
diff --git a/testdata/language-features/basic-list/list02.out b/testdata/language-features/basic-list/list02.out index dec74991..6101a1fa 100644 --- a/testdata/language-features/basic-list/list02.out +++ b/testdata/language-features/basic-list/list02.out | |||
@@ -1,8 +1,10 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 = _rhs [] | 3 | value1 = _rhs [] |
4 | |||
3 | value2 = _rhs (fromInt 1 : fromInt 2 : fromInt 3 : fromInt 4 : []) | 5 | value2 = _rhs (fromInt 1 : fromInt 2 : fromInt 3 : fromInt 4 : []) |
6 | |||
4 | value3 = _rhs ('h' : 'e' : 'l' : 'l' : 'o' : []) | 7 | value3 = _rhs ('h' : 'e' : 'l' : 'l' : 'o' : []) |
5 | main is not found | ||
6 | ------------ trace | 8 | ------------ trace |
7 | value1 :: forall a . [a] | 9 | value1 :: forall a . [a] |
8 | value2 :: forall a . Num a => [a] | 10 | value2 :: forall a . Num a => [a] |
diff --git a/testdata/language-features/basic-list/list08.out b/testdata/language-features/basic-list/list08.out index aebab457..800c75aa 100644 --- a/testdata/language-features/basic-list/list08.out +++ b/testdata/language-features/basic-list/list08.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs (fromInt 1 : 1.2 : []) | 3 | value = _rhs (fromInt 1 : 1.2 : []) |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: [Float] | 5 | value :: [Float] |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-list/list09.out b/testdata/language-features/basic-list/list09.out index 11abf486..79bb9d42 100644 --- a/testdata/language-features/basic-list/list09.out +++ b/testdata/language-features/basic-list/list09.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs (fromInt 1 : 1.2 : [] :: [Float]) | 3 | value = _rhs (fromInt 1 : 1.2 : [] :: [Float]) |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: [Float] | 5 | value :: [Float] |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-list/list11.out b/testdata/language-features/basic-list/list11.out index b70c324c..005c6959 100644 --- a/testdata/language-features/basic-list/list11.out +++ b/testdata/language-features/basic-list/list11.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs (fromInt 1 : []) | 3 | value = _rhs (fromInt 1 : []) |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: forall a . Num a => [a] | 5 | value :: forall a . Num a => [a] |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-list/list12.out b/testdata/language-features/basic-list/list12.out index 5a5f796d..75cc03e1 100644 --- a/testdata/language-features/basic-list/list12.out +++ b/testdata/language-features/basic-list/list12.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs (fromInt 1 : fromInt 2 : fromInt 3 : fromInt 4 : fromInt 5 : []) | 3 | value = _rhs (fromInt 1 : fromInt 2 : fromInt 3 : fromInt 4 : fromInt 5 : []) |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: forall a . Num a => [a] | 5 | value :: forall a . Num a => [a] |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-list/list13.out b/testdata/language-features/basic-list/list13.out index 66403b86..9e72ee74 100644 --- a/testdata/language-features/basic-list/list13.out +++ b/testdata/language-features/basic-list/list13.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs ('h' : 'e' : 'l' : 'l' : 'o' : []) | 3 | value = _rhs ('h' : 'e' : 'l' : 'l' : 'o' : []) |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: [Char] | 5 | value :: [Char] |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-list/listcomp01.out b/testdata/language-features/basic-list/listcomp01.out index fe914476..52af0c94 100644 --- a/testdata/language-features/basic-list/listcomp01.out +++ b/testdata/language-features/basic-list/listcomp01.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs (concatMap (\_ -> HNil : []) (HNil : HNil : HNil : HNil : [])) | 3 | value = _rhs (concatMap (\_ -> HNil : []) (HNil : HNil : HNil : HNil : [])) |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: [()] | 5 | value :: [()] |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-list/listcomp02.out b/testdata/language-features/basic-list/listcomp02.out index 8d7d9de5..7a2a2998 100644 --- a/testdata/language-features/basic-list/listcomp02.out +++ b/testdata/language-features/basic-list/listcomp02.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | l = _rhs (HNil : HNil : HNil : HNil : []) | 3 | l = _rhs (HNil : HNil : HNil : HNil : []) |
4 | |||
3 | value = _rhs (concatMap (\(a :: _) -> a : []) l) | 5 | value = _rhs (concatMap (\(a :: _) -> a : []) l) |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | l :: [()] | 7 | l :: [()] |
7 | value :: [()] | 8 | value :: [()] |
diff --git a/testdata/language-features/basic-list/listcomp03.out b/testdata/language-features/basic-list/listcomp03.out index 3de6ae88..ee6dfd4a 100644 --- a/testdata/language-features/basic-list/listcomp03.out +++ b/testdata/language-features/basic-list/listcomp03.out | |||
@@ -1,10 +1,10 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value | 3 | value |
3 | = _rhs | 4 | = _rhs |
4 | (concatMap | 5 | (concatMap |
5 | (\_ -> primIfThenElse False (HNil : []) []) | 6 | (\_ -> primIfThenElse False (HNil : []) []) |
6 | (HNil : HNil : HNil : HNil : [])) | 7 | (HNil : HNil : HNil : HNil : [])) |
7 | main is not found | ||
8 | ------------ trace | 8 | ------------ trace |
9 | value :: [()] | 9 | value :: [()] |
10 | ------------ tooltips | 10 | ------------ tooltips |
diff --git a/testdata/language-features/basic-list/listcomp04.out b/testdata/language-features/basic-list/listcomp04.out index dce40a1a..1069a83b 100644 --- a/testdata/language-features/basic-list/listcomp04.out +++ b/testdata/language-features/basic-list/listcomp04.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | l = _rhs (HNil : HNil : HNil : HNil : []) | 3 | l = _rhs (HNil : HNil : HNil : HNil : []) |
4 | |||
3 | value = _rhs (concatMap (\_ -> concatMap (\_ -> HNil : []) l) l) | 5 | value = _rhs (concatMap (\_ -> concatMap (\_ -> HNil : []) l) l) |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | l :: [()] | 7 | l :: [()] |
7 | value :: [()] | 8 | value :: [()] |
diff --git a/testdata/language-features/basic-list/listcomp05.out b/testdata/language-features/basic-list/listcomp05.out index 69de4559..b9c7afdb 100644 --- a/testdata/language-features/basic-list/listcomp05.out +++ b/testdata/language-features/basic-list/listcomp05.out | |||
@@ -1,10 +1,10 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value | 3 | value |
3 | = _rhs | 4 | = _rhs |
4 | (concatMap | 5 | (concatMap |
5 | (\_ (a := _rhs HNil) (b := _rhs ((\(c :: _) -> c) a)) -> b : []) | 6 | (\_ (a := _rhs HNil) (b := _rhs ((\(c :: _) -> c) a)) -> b : []) |
6 | (HNil : HNil : [])) | 7 | (HNil : HNil : [])) |
7 | main is not found | ||
8 | ------------ trace | 8 | ------------ trace |
9 | value :: [()] | 9 | value :: [()] |
10 | ------------ tooltips | 10 | ------------ tooltips |
diff --git a/testdata/language-features/basic-list/listcomp06.out b/testdata/language-features/basic-list/listcomp06.out index 590793bb..51a69cf6 100644 --- a/testdata/language-features/basic-list/listcomp06.out +++ b/testdata/language-features/basic-list/listcomp06.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 | 3 | value1 |
3 | = _rhs | 4 | = _rhs |
@@ -7,6 +8,7 @@ value1 | |||
7 | (b : []) | 8 | (b : []) |
8 | []) | 9 | []) |
9 | (HNil : HNil : [])) | 10 | (HNil : HNil : [])) |
11 | |||
10 | value2 | 12 | value2 |
11 | = _rhs | 13 | = _rhs |
12 | (concatMap | 14 | (concatMap |
@@ -15,7 +17,6 @@ value2 | |||
15 | (\(a := _rhs HNil) (b := _rhs ((\(c :: _) -> c) a)) -> b : []) | 17 | (\(a := _rhs HNil) (b := _rhs ((\(c :: _) -> c) a)) -> b : []) |
16 | []) | 18 | []) |
17 | (HNil : HNil : [])) | 19 | (HNil : HNil : [])) |
18 | main is not found | ||
19 | ------------ trace | 20 | ------------ trace |
20 | value1 :: [()] | 21 | value1 :: [()] |
21 | value2 :: [()] | 22 | value2 :: [()] |
diff --git a/testdata/language-features/basic-list/listcomp07.out b/testdata/language-features/basic-list/listcomp07.out index a3e5a671..483d128f 100644 --- a/testdata/language-features/basic-list/listcomp07.out +++ b/testdata/language-features/basic-list/listcomp07.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 | 3 | value1 |
3 | = _rhs | 4 | = _rhs |
@@ -7,6 +8,7 @@ value1 | |||
7 | (\(d := _rhs b) (e := _rhs ((\(f :: _) -> f) d)) -> b : []) | 8 | (\(d := _rhs b) (e := _rhs ((\(f :: _) -> f) d)) -> b : []) |
8 | []) | 9 | []) |
9 | (HNil : HNil : [])) | 10 | (HNil : HNil : [])) |
11 | |||
10 | value2 | 12 | value2 |
11 | = _rhs | 13 | = _rhs |
12 | (concatMap | 14 | (concatMap |
@@ -15,6 +17,7 @@ value2 | |||
15 | (\(d := _rhs b) (e := _rhs ((\(f :: _) -> f) d)) -> b : []) | 17 | (\(d := _rhs b) (e := _rhs ((\(f :: _) -> f) d)) -> b : []) |
16 | []) | 18 | []) |
17 | (HNil : HNil : [])) | 19 | (HNil : HNil : [])) |
20 | |||
18 | value3 | 21 | value3 |
19 | = _rhs | 22 | = _rhs |
20 | (concatMap | 23 | (concatMap |
@@ -23,7 +26,6 @@ value3 | |||
23 | (\(d := _rhs b) (e := _rhs ((\(f :: _) -> f) d)) -> b : []) | 26 | (\(d := _rhs b) (e := _rhs ((\(f :: _) -> f) d)) -> b : []) |
24 | []) | 27 | []) |
25 | (HNil : HNil : [])) | 28 | (HNil : HNil : [])) |
26 | main is not found | ||
27 | ------------ trace | 29 | ------------ trace |
28 | value1 :: [()] | 30 | value1 :: [()] |
29 | value2 :: [()] | 31 | value2 :: [()] |
diff --git a/testdata/language-features/basic-list/listcomp09.out b/testdata/language-features/basic-list/listcomp09.out index 96351e61..75d2dbf5 100644 --- a/testdata/language-features/basic-list/listcomp09.out +++ b/testdata/language-features/basic-list/listcomp09.out | |||
@@ -1,7 +1,7 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 | 3 | value1 |
3 | = _rhs (concatMap (\_ -> (\(a :: _) -> hlistNilCase _ "Hello" a) : []) []) | 4 | = _rhs (concatMap (\_ -> (\(a :: _) -> hlistNilCase _ "Hello" a) : []) []) |
4 | main is not found | ||
5 | ------------ trace | 5 | ------------ trace |
6 | value1 :: Type => [() -> String] | 6 | value1 :: Type => [() -> String] |
7 | ------------ tooltips | 7 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/bool01.out b/testdata/language-features/basic-values/bool01.out index 80315cf0..339dbe3a 100644 --- a/testdata/language-features/basic-values/bool01.out +++ b/testdata/language-features/basic-values/bool01.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 = _rhs True | 3 | value1 = _rhs True |
4 | |||
3 | value2 = _rhs False | 5 | value2 = _rhs False |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | value1 :: Bool | 7 | value1 :: Bool |
7 | value2 :: Bool | 8 | value2 :: Bool |
diff --git a/testdata/language-features/basic-values/case01.out b/testdata/language-features/basic-values/case01.out index 8b4334e6..7a952e7a 100644 --- a/testdata/language-features/basic-values/case01.out +++ b/testdata/language-features/basic-values/case01.out | |||
@@ -1,11 +1,16 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) | 3 | value1 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) |
4 | |||
3 | value2 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) | 5 | value2 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) |
6 | |||
4 | value3 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) | 7 | value3 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) |
8 | |||
5 | value4 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) | 9 | value4 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) |
10 | |||
6 | value5 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) | 11 | value5 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) |
12 | |||
7 | value6 = _rhs ((\_ -> HNil) HNil) | 13 | value6 = _rhs ((\_ -> HNil) HNil) |
8 | main is not found | ||
9 | ------------ trace | 14 | ------------ trace |
10 | value1 :: () | 15 | value1 :: () |
11 | value2 :: () | 16 | value2 :: () |
diff --git a/testdata/language-features/basic-values/case02.out b/testdata/language-features/basic-values/case02.out index a5f57070..9456dae9 100644 --- a/testdata/language-features/basic-values/case02.out +++ b/testdata/language-features/basic-values/case02.out | |||
@@ -1,7 +1,9 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 | 3 | value1 |
3 | = _rhs | 4 | = _rhs |
4 | ((\(a :: _) -> case'Bool (\_ -> _) HNil HNil (fromInt 1 == a)) (fromInt 1)) | 5 | ((\(a :: _) -> case'Bool (\_ -> _) HNil HNil (fromInt 1 == a)) (fromInt 1)) |
6 | |||
5 | value2 | 7 | value2 |
6 | = _rhs | 8 | = _rhs |
7 | ((\(a :: _) -> case'Bool | 9 | ((\(a :: _) -> case'Bool |
@@ -10,7 +12,6 @@ value2 | |||
10 | "1" | 12 | "1" |
11 | (fromInt 1 == a)) | 13 | (fromInt 1 == a)) |
12 | (fromInt 2)) | 14 | (fromInt 2)) |
13 | main is not found | ||
14 | ------------ trace | 15 | ------------ trace |
15 | value1 :: forall a . (Eq a, Num a) => () | 16 | value1 :: forall a . (Eq a, Num a) => () |
16 | value2 :: forall a . (Eq a, Num a, Eq a, Num a) => String | 17 | value2 :: forall a . (Eq a, Num a, Eq a, Num a) => String |
diff --git a/testdata/language-features/basic-values/case05.out b/testdata/language-features/basic-values/case05.out index e099d30d..2c1ab232 100644 --- a/testdata/language-features/basic-values/case05.out +++ b/testdata/language-features/basic-values/case05.out | |||
@@ -1,8 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value | 3 | value |
3 | = \(a :: _) -> _rhs | 4 | = \(a :: _) -> _rhs |
4 | ((\(b :: _) -> case'Bool (\_ -> _) undefined '1' (fromInt 1 == b)) a) | 5 | ((\(b :: _) -> case'Bool (\_ -> _) undefined '1' (fromInt 1 == b)) a) |
5 | main is not found | ||
6 | ------------ trace | 6 | ------------ trace |
7 | value :: forall a . (Eq a, Num a) => a -> Char | 7 | value :: forall a . (Eq a, Num a) => a -> Char |
8 | ------------ tooltips | 8 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/case06.out b/testdata/language-features/basic-values/case06.out index aaeff605..65999ca4 100644 --- a/testdata/language-features/basic-values/case06.out +++ b/testdata/language-features/basic-values/case06.out | |||
@@ -1,8 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value | 3 | value |
3 | = \(a :: _) -> _rhs | 4 | = \(a :: _) -> _rhs |
4 | ((\(b :: _) -> case'Bool (\_ -> _) '_' '1' (fromInt 1 == b)) a) | 5 | ((\(b :: _) -> case'Bool (\_ -> _) '_' '1' (fromInt 1 == b)) a) |
5 | main is not found | ||
6 | ------------ trace | 6 | ------------ trace |
7 | value :: forall a . (Eq a, Num a) => a -> Char | 7 | value :: forall a . (Eq a, Num a) => a -> Char |
8 | ------------ tooltips | 8 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/data01.out b/testdata/language-features/basic-values/data01.out index 7845cf0a..9efc26b6 100644 --- a/testdata/language-features/basic-values/data01.out +++ b/testdata/language-features/basic-values/data01.out | |||
@@ -1,17 +1,19 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | data A :: Type where | 3 | data A :: Type where |
3 | B :: A | 4 | B :: A |
4 | C :: A | 5 | C :: A |
5 | D :: A | 6 | D :: A |
7 | |||
6 | data E :: Type where | 8 | data E :: Type where |
7 | F :: E | 9 | F :: E |
8 | G :: HList '[] -> E | 10 | G :: HList '[] -> E |
9 | H :: E | 11 | H :: E |
12 | |||
10 | data D1 :: Type where | 13 | data D1 :: Type where |
11 | C1 :: D1 | 14 | C1 :: D1 |
12 | C2 :: HList '[] -> D1 | 15 | C2 :: HList '[] -> D1 |
13 | C3 :: D1 | 16 | C3 :: D1 |
14 | main is not found | ||
15 | ------------ trace | 17 | ------------ trace |
16 | 'A :: Type | 18 | 'A :: Type |
17 | B :: A | 19 | B :: A |
diff --git a/testdata/language-features/basic-values/def01.out b/testdata/language-features/basic-values/def01.out index 6aa4d014..520b99c3 100644 --- a/testdata/language-features/basic-values/def01.out +++ b/testdata/language-features/basic-values/def01.out | |||
@@ -1,8 +1,10 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | unit = _rhs HNil | 3 | unit = _rhs HNil |
4 | |||
3 | fun1 = \_ -> _rhs (fromInt 1) | 5 | fun1 = \_ -> _rhs (fromInt 1) |
6 | |||
4 | fun2 = \_ _ _ _ _ -> _rhs 'c' | 7 | fun2 = \_ _ _ _ _ -> _rhs 'c' |
5 | main is not found | ||
6 | ------------ trace | 8 | ------------ trace |
7 | unit :: () | 9 | unit :: () |
8 | fun1 :: forall a b . Num b => a -> b | 10 | fun1 :: forall a b . Num b => a -> b |
diff --git a/testdata/language-features/basic-values/def03.out b/testdata/language-features/basic-values/def03.out index ceb6a8e1..c4bed094 100644 --- a/testdata/language-features/basic-values/def03.out +++ b/testdata/language-features/basic-values/def03.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun | 3 | fun |
3 | = \(a :: _) -> case'Bool | 4 | = \(a :: _) -> case'Bool |
@@ -5,7 +6,6 @@ fun | |||
5 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs '2') (fromInt 2 == a)) | 6 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs '2') (fromInt 2 == a)) |
6 | (_rhs '1') | 7 | (_rhs '1') |
7 | (fromInt 1 == a) | 8 | (fromInt 1 == a) |
8 | main is not found | ||
9 | ------------ trace | 9 | ------------ trace |
10 | fun :: forall a . (Eq a, Num a, Eq a, Num a) => a -> Char | 10 | fun :: forall a . (Eq a, Num a, Eq a, Num a) => a -> Char |
11 | ------------ tooltips | 11 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/def04.out b/testdata/language-features/basic-values/def04.out index e52f9d64..e6dfbba7 100644 --- a/testdata/language-features/basic-values/def04.out +++ b/testdata/language-features/basic-values/def04.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun | 3 | fun |
3 | = \(a :: _) -> case'Bool | 4 | = \(a :: _) -> case'Bool |
@@ -5,13 +6,13 @@ fun | |||
5 | (case'Bool (\_ -> _) (_rhs '_') (_rhs '2') (fromInt 2 == a)) | 6 | (case'Bool (\_ -> _) (_rhs '_') (_rhs '2') (fromInt 2 == a)) |
6 | (_rhs '1') | 7 | (_rhs '1') |
7 | (fromInt 1 == a) | 8 | (fromInt 1 == a) |
9 | |||
8 | fun2 | 10 | fun2 |
9 | = \(a :: _) _ -> case'Bool | 11 | = \(a :: _) _ -> case'Bool |
10 | (\_ -> _) | 12 | (\_ -> _) |
11 | (case'Bool (\_ -> _) (_rhs '_') (_rhs '2') (fromInt 2 == a)) | 13 | (case'Bool (\_ -> _) (_rhs '_') (_rhs '2') (fromInt 2 == a)) |
12 | (_rhs '1') | 14 | (_rhs '1') |
13 | (fromInt 1 == a) | 15 | (fromInt 1 == a) |
14 | main is not found | ||
15 | ------------ trace | 16 | ------------ trace |
16 | fun :: forall a . (Eq a, Num a, Eq a, Num a) => a -> Char | 17 | fun :: forall a . (Eq a, Num a, Eq a, Num a) => a -> Char |
17 | fun2 :: forall a b . (Eq a, Num a, Eq a, Num a) => a -> b -> Char | 18 | fun2 :: forall a b . (Eq a, Num a, Eq a, Num a) => a -> b -> Char |
diff --git a/testdata/language-features/basic-values/deforder01.out b/testdata/language-features/basic-values/deforder01.out index 2d6ace49..14117b02 100644 --- a/testdata/language-features/basic-values/deforder01.out +++ b/testdata/language-features/basic-values/deforder01.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | x = _rhs '1' | 3 | x = _rhs '1' |
4 | |||
3 | y = _rhs x | 5 | y = _rhs x |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | x :: Char | 7 | x :: Char |
7 | y :: Char | 8 | y :: Char |
diff --git a/testdata/language-features/basic-values/deforder02.out b/testdata/language-features/basic-values/deforder02.out index 7a36e690..23d62c33 100644 --- a/testdata/language-features/basic-values/deforder02.out +++ b/testdata/language-features/basic-values/deforder02.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | x = _rhs '1' | 3 | x = _rhs '1' |
4 | |||
3 | y = _rhs x | 5 | y = _rhs x |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | x :: Char | 7 | x :: Char |
7 | y :: Char | 8 | y :: Char |
diff --git a/testdata/language-features/basic-values/deforder03.out b/testdata/language-features/basic-values/deforder03.out index efc49155..8065aa9f 100644 --- a/testdata/language-features/basic-values/deforder03.out +++ b/testdata/language-features/basic-values/deforder03.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs \(a := _rhs HNil) (b := _rhs a) -> '1' | 3 | value = _rhs \(a := _rhs HNil) (b := _rhs a) -> '1' |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: Char | 5 | value :: Char |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/deforder04.out b/testdata/language-features/basic-values/deforder04.out index 05e51d11..8f80d78e 100644 --- a/testdata/language-features/basic-values/deforder04.out +++ b/testdata/language-features/basic-values/deforder04.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs \(a := _rhs HNil) (b := _rhs a) -> '1' | 3 | value = _rhs \(a := _rhs HNil) (b := _rhs a) -> '1' |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: Char | 5 | value :: Char |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/deforder05.out b/testdata/language-features/basic-values/deforder05.out index b5da0fdd..853498eb 100644 --- a/testdata/language-features/basic-values/deforder05.out +++ b/testdata/language-features/basic-values/deforder05.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs \(a := _rhs HNil) (b := _rhs a) -> '1' | 3 | value = _rhs \(a := _rhs HNil) (b := _rhs a) -> '1' |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: Char | 5 | value :: Char |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/deforder06.out b/testdata/language-features/basic-values/deforder06.out index 7c4a2b4a..565b3ee0 100644 --- a/testdata/language-features/basic-values/deforder06.out +++ b/testdata/language-features/basic-values/deforder06.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs \(a := _rhs HNil) (b := _rhs a) -> '1' | 3 | value = _rhs \(a := _rhs HNil) (b := _rhs a) -> '1' |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: Char | 5 | value :: Char |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/fixity01.out b/testdata/language-features/basic-values/fixity01.out index bcc2a126..22e2ae45 100644 --- a/testdata/language-features/basic-values/fixity01.out +++ b/testdata/language-features/basic-values/fixity01.out | |||
@@ -1,13 +1,20 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | funL = \(a :: _) _ -> _rhs a | 3 | funL = \(a :: _) _ -> _rhs a |
4 | |||
3 | funR = \(a :: _) _ -> _rhs a | 5 | funR = \(a :: _) _ -> _rhs a |
6 | |||
4 | (<<<<) = \(a :: _) _ -> _rhs a | 7 | (<<<<) = \(a :: _) _ -> _rhs a |
8 | |||
5 | (>>>>) = \_ (a :: _) -> _rhs a | 9 | (>>>>) = \_ (a :: _) -> _rhs a |
10 | |||
6 | infixr 7 funL | 11 | infixr 7 funL |
12 | |||
7 | infixr 7 <<<< | 13 | infixr 7 <<<< |
14 | |||
8 | infixr 6 >>>> | 15 | infixr 6 >>>> |
16 | |||
9 | infixr 6 funR | 17 | infixr 6 funR |
10 | main is not found | ||
11 | ------------ trace | 18 | ------------ trace |
12 | funL :: forall a b . a -> b -> a | 19 | funL :: forall a b . a -> b -> a |
13 | funR :: forall a b . a -> b -> a | 20 | funR :: forall a b . a -> b -> a |
diff --git a/testdata/language-features/basic-values/fixity02.out b/testdata/language-features/basic-values/fixity02.out index acdd5309..841eda57 100644 --- a/testdata/language-features/basic-values/fixity02.out +++ b/testdata/language-features/basic-values/fixity02.out | |||
@@ -1,29 +1,52 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | funL = \(a :: _) _ -> _rhs a | 3 | funL = \(a :: _) _ -> _rhs a |
4 | |||
3 | funR = \_ (a :: _) -> _rhs a | 5 | funR = \_ (a :: _) -> _rhs a |
6 | |||
4 | (<@) = \(a :: _) _ -> _rhs a | 7 | (<@) = \(a :: _) _ -> _rhs a |
8 | |||
5 | (@>) = \_ (a :: _) -> _rhs a | 9 | (@>) = \_ (a :: _) -> _rhs a |
10 | |||
6 | infixr 7 funL | 11 | infixr 7 funL |
12 | |||
7 | infixr 7 <@ | 13 | infixr 7 <@ |
14 | |||
8 | infixr 6 @> | 15 | infixr 6 @> |
16 | |||
9 | infixr 6 funR | 17 | infixr 6 funR |
18 | |||
10 | value1 = _rhs (HNil @> 'c' @> "hi" @> 1.2 :: Float) | 19 | value1 = _rhs (HNil @> 'c' @> "hi" @> 1.2 :: Float) |
20 | |||
11 | value2 = _rhs (HNil @> 'c' <@ "hi" @> 1.2 :: Float) | 21 | value2 = _rhs (HNil @> 'c' <@ "hi" @> 1.2 :: Float) |
22 | |||
12 | value3 = _rhs (HNil <@ 'c' @> "hi" @> 1.2 :: Float) | 23 | value3 = _rhs (HNil <@ 'c' @> "hi" @> 1.2 :: Float) |
24 | |||
13 | value4 = _rhs (HNil <@ 'c' <@ "hi" @> 1.2 :: Float) | 25 | value4 = _rhs (HNil <@ 'c' <@ "hi" @> 1.2 :: Float) |
26 | |||
14 | value5 = _rhs (HNil @> 'c' @> "hi" <@ 1.2 :: String) | 27 | value5 = _rhs (HNil @> 'c' @> "hi" <@ 1.2 :: String) |
28 | |||
15 | value6 = _rhs (HNil @> 'c' <@ "hi" <@ 1.2 :: Char) | 29 | value6 = _rhs (HNil @> 'c' <@ "hi" <@ 1.2 :: Char) |
30 | |||
16 | value7 = _rhs (HNil <@ 'c' @> "hi" <@ 1.2 :: String) | 31 | value7 = _rhs (HNil <@ 'c' @> "hi" <@ 1.2 :: String) |
32 | |||
17 | value8 = _rhs (HNil <@ 'c' <@ "hi" <@ 1.2 :: HList '[]) | 33 | value8 = _rhs (HNil <@ 'c' <@ "hi" <@ 1.2 :: HList '[]) |
34 | |||
18 | funValue1 = _rhs (HNil `funR` 'c' `funR` "hi" `funR` 1.2 :: Float) | 35 | funValue1 = _rhs (HNil `funR` 'c' `funR` "hi" `funR` 1.2 :: Float) |
36 | |||
19 | funValue2 = _rhs (HNil `funR` 'c' `funL` "hi" `funR` 1.2 :: Float) | 37 | funValue2 = _rhs (HNil `funR` 'c' `funL` "hi" `funR` 1.2 :: Float) |
38 | |||
20 | funValue3 = _rhs (HNil `funL` 'c' `funR` "hi" `funR` 1.2 :: Float) | 39 | funValue3 = _rhs (HNil `funL` 'c' `funR` "hi" `funR` 1.2 :: Float) |
40 | |||
21 | funValue4 = _rhs (HNil `funL` 'c' `funL` "hi" `funR` 1.2 :: Float) | 41 | funValue4 = _rhs (HNil `funL` 'c' `funL` "hi" `funR` 1.2 :: Float) |
42 | |||
22 | funValue5 = _rhs (HNil `funR` 'c' `funR` "hi" `funL` 1.2 :: String) | 43 | funValue5 = _rhs (HNil `funR` 'c' `funR` "hi" `funL` 1.2 :: String) |
44 | |||
23 | funValue6 = _rhs (HNil `funR` 'c' `funL` "hi" `funL` 1.2 :: Char) | 45 | funValue6 = _rhs (HNil `funR` 'c' `funL` "hi" `funL` 1.2 :: Char) |
46 | |||
24 | funValue7 = _rhs (HNil `funL` 'c' `funR` "hi" `funL` 1.2 :: String) | 47 | funValue7 = _rhs (HNil `funL` 'c' `funR` "hi" `funL` 1.2 :: String) |
48 | |||
25 | funValue8 = _rhs (HNil `funL` 'c' `funL` "hi" `funL` 1.2 :: HList '[]) | 49 | funValue8 = _rhs (HNil `funL` 'c' `funL` "hi" `funL` 1.2 :: HList '[]) |
26 | main is not found | ||
27 | ------------ trace | 50 | ------------ trace |
28 | funL :: forall a b . a -> b -> a | 51 | funL :: forall a b . a -> b -> a |
29 | funR :: forall a b . a -> b -> b | 52 | funR :: forall a b . a -> b -> b |
diff --git a/testdata/language-features/basic-values/if01.out b/testdata/language-features/basic-values/if01.out index b16d8586..fdd04aba 100644 --- a/testdata/language-features/basic-values/if01.out +++ b/testdata/language-features/basic-values/if01.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 = _rhs (primIfThenElse True HNil HNil) | 3 | value1 = _rhs (primIfThenElse True HNil HNil) |
4 | |||
3 | value2 = _rhs (primIfThenElse False 1.0 2.0) | 5 | value2 = _rhs (primIfThenElse False 1.0 2.0) |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | value1 :: () | 7 | value1 :: () |
7 | value2 :: Float | 8 | value2 :: Float |
diff --git a/testdata/language-features/basic-values/indentation01.out b/testdata/language-features/basic-values/indentation01.out index a607690b..3c77aa23 100644 --- a/testdata/language-features/basic-values/indentation01.out +++ b/testdata/language-features/basic-values/indentation01.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | tuple1 = _rhs HNil | 3 | tuple1 = _rhs HNil |
4 | |||
3 | tuple2 = _rhs HNil | 5 | tuple2 = _rhs HNil |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | tuple1 :: () | 7 | tuple1 :: () |
7 | tuple2 :: () | 8 | tuple2 :: () |
diff --git a/testdata/language-features/basic-values/indentation02.out b/testdata/language-features/basic-values/indentation02.out index 97b138e0..9a4cafc0 100644 --- a/testdata/language-features/basic-values/indentation02.out +++ b/testdata/language-features/basic-values/indentation02.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | tuple1 = _rhs HNil | 3 | tuple1 = _rhs HNil |
4 | |||
3 | tuple2 = _rhs HNil | 5 | tuple2 = _rhs HNil |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | tuple1 :: () | 7 | tuple1 :: () |
7 | tuple2 :: () | 8 | tuple2 :: () |
diff --git a/testdata/language-features/basic-values/infix01.out b/testdata/language-features/basic-values/infix01.out index 013b0a25..3e4ec8a6 100644 --- a/testdata/language-features/basic-values/infix01.out +++ b/testdata/language-features/basic-values/infix01.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun = \_ _ -> _rhs HNil | 3 | fun = \_ _ -> _rhs HNil |
4 | |||
3 | value = \(a :: _) (b :: _) -> _rhs (a `fun` b) | 5 | value = \(a :: _) (b :: _) -> _rhs (a `fun` b) |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | fun :: forall a b . a -> b -> () | 7 | fun :: forall a b . a -> b -> () |
7 | value :: forall a b . a -> b -> () | 8 | value :: forall a b . a -> b -> () |
diff --git a/testdata/language-features/basic-values/infix02.out b/testdata/language-features/basic-values/infix02.out index dd15a9e9..be8609ef 100644 --- a/testdata/language-features/basic-values/infix02.out +++ b/testdata/language-features/basic-values/infix02.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun = \_ _ _ -> _rhs HNil | 3 | fun = \_ _ _ -> _rhs HNil |
4 | |||
3 | value = \(a :: _) (b :: _) -> _rhs (a `fun` b) | 5 | value = \(a :: _) (b :: _) -> _rhs (a `fun` b) |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | fun :: forall a b c . a -> b -> c -> () | 7 | fun :: forall a b c . a -> b -> c -> () |
7 | value :: forall a b c . a -> b -> c -> () | 8 | value :: forall a b c . a -> b -> c -> () |
diff --git a/testdata/language-features/basic-values/infix03.out b/testdata/language-features/basic-values/infix03.out index 81521b91..3b7d6ec2 100644 --- a/testdata/language-features/basic-values/infix03.out +++ b/testdata/language-features/basic-values/infix03.out | |||
@@ -1,10 +1,12 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | data D :: Type where | 3 | data D :: Type where |
3 | D2 :: HList '[] -> HList '[] -> D | 4 | D2 :: HList '[] -> HList '[] -> D |
4 | D3 :: HList '[] -> HList '[] -> HList '[] -> D | 5 | D3 :: HList '[] -> HList '[] -> HList '[] -> D |
6 | |||
5 | d2 = \(a :: _) (b :: _) -> _rhs (a `D2` b) | 7 | d2 = \(a :: _) (b :: _) -> _rhs (a `D2` b) |
8 | |||
6 | d3 = \(a :: _) (b :: _) -> _rhs (a `D3` b) | 9 | d3 = \(a :: _) (b :: _) -> _rhs (a `D3` b) |
7 | main is not found | ||
8 | ------------ trace | 10 | ------------ trace |
9 | 'D :: Type | 11 | 'D :: Type |
10 | D2 :: () -> () -> D | 12 | D2 :: () -> () -> D |
diff --git a/testdata/language-features/basic-values/lambda01.out b/testdata/language-features/basic-values/lambda01.out index 0d73915c..9a7c4583 100644 --- a/testdata/language-features/basic-values/lambda01.out +++ b/testdata/language-features/basic-values/lambda01.out | |||
@@ -1,9 +1,12 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun1 = _rhs \_ -> HNil | 3 | fun1 = _rhs \_ -> HNil |
4 | |||
3 | fun2 = _rhs \_ -> HNil | 5 | fun2 = _rhs \_ -> HNil |
6 | |||
4 | fun3 = _rhs \_ -> HNil | 7 | fun3 = _rhs \_ -> HNil |
8 | |||
5 | fun4 = _rhs \_ _ _ _ _ _ _ _ _ -> HNil | 9 | fun4 = _rhs \_ _ _ _ _ _ _ _ _ -> HNil |
6 | main is not found | ||
7 | ------------ trace | 10 | ------------ trace |
8 | fun1 :: forall a . a -> () | 11 | fun1 :: forall a . a -> () |
9 | fun2 :: forall a . a -> () | 12 | fun2 :: forall a . a -> () |
diff --git a/testdata/language-features/basic-values/lambda03.out b/testdata/language-features/basic-values/lambda03.out index 5ea529b3..97ee5c15 100644 --- a/testdata/language-features/basic-values/lambda03.out +++ b/testdata/language-features/basic-values/lambda03.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun1 = _rhs \_ (a :: _) _ -> a | 3 | fun1 = _rhs \_ (a :: _) _ -> a |
4 | |||
3 | fun2 = \(a :: _) -> _rhs \_ _ _ -> a | 5 | fun2 = \(a :: _) -> _rhs \_ _ _ -> a |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | fun1 :: forall a b c . a -> b -> c -> b | 7 | fun1 :: forall a b c . a -> b -> c -> b |
7 | fun2 :: forall a b c d . a -> b -> c -> d -> a | 8 | fun2 :: forall a b c d . a -> b -> c -> d -> a |
diff --git a/testdata/language-features/basic-values/let01.out b/testdata/language-features/basic-values/let01.out index 33524e88..dd6cad7e 100644 --- a/testdata/language-features/basic-values/let01.out +++ b/testdata/language-features/basic-values/let01.out | |||
@@ -1,10 +1,14 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 = _rhs \(a := _rhs (fromInt 1)) -> fromInt 1 | 3 | value1 = _rhs \(a := _rhs (fromInt 1)) -> fromInt 1 |
4 | |||
3 | value2 = _rhs \(a := _rhs (fromInt 1)) -> fromInt 1 | 5 | value2 = _rhs \(a := _rhs (fromInt 1)) -> fromInt 1 |
6 | |||
4 | value3 = _rhs \(a := _rhs (fromInt 1)) (b := _rhs 'c') -> fromInt 1 | 7 | value3 = _rhs \(a := _rhs (fromInt 1)) (b := _rhs 'c') -> fromInt 1 |
8 | |||
5 | value4 = _rhs \(a := _rhs (fromInt 1)) -> fromInt 1 | 9 | value4 = _rhs \(a := _rhs (fromInt 1)) -> fromInt 1 |
10 | |||
6 | value5 = _rhs \(a := _rhs (fromInt 1)) (b := _rhs (fromInt 2)) -> fromInt 1 | 11 | value5 = _rhs \(a := _rhs (fromInt 1)) (b := _rhs (fromInt 2)) -> fromInt 1 |
7 | main is not found | ||
8 | ------------ trace | 12 | ------------ trace |
9 | value1 :: forall a . Num a => a | 13 | value1 :: forall a . Num a => a |
10 | value2 :: forall a . Num a => a | 14 | value2 :: forall a . Num a => a |
diff --git a/testdata/language-features/basic-values/let02.out b/testdata/language-features/basic-values/let02.out index 44be34a1..f4e67d6a 100644 --- a/testdata/language-features/basic-values/let02.out +++ b/testdata/language-features/basic-values/let02.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value | 3 | value |
3 | = _rhs | 4 | = _rhs |
@@ -6,7 +7,6 @@ value | |||
6 | (c | 7 | (c |
7 | := _rhs | 8 | := _rhs |
8 | \(e := _rhs HNil) (f := _rhs (fromInt 1)) (g := _rhs "hello") -> 'B') -> HNil | 9 | \(e := _rhs HNil) (f := _rhs (fromInt 1)) (g := _rhs "hello") -> 'B') -> HNil |
9 | main is not found | ||
10 | ------------ trace | 10 | ------------ trace |
11 | value :: () | 11 | value :: () |
12 | ------------ tooltips | 12 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/literal01.out b/testdata/language-features/basic-values/literal01.out index b45e2a20..ec3b6908 100644 --- a/testdata/language-features/basic-values/literal01.out +++ b/testdata/language-features/basic-values/literal01.out | |||
@@ -1,13 +1,20 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | intValue1 = _rhs (fromInt 0) | 3 | intValue1 = _rhs (fromInt 0) |
4 | |||
3 | intValue2 = _rhs (fromInt 1) | 5 | intValue2 = _rhs (fromInt 1) |
6 | |||
4 | intValue3 = _rhs (fromInt 12345) | 7 | intValue3 = _rhs (fromInt 12345) |
8 | |||
5 | floatValue1 = _rhs 2.0 | 9 | floatValue1 = _rhs 2.0 |
10 | |||
6 | floatValue2 = _rhs 123400.0 | 11 | floatValue2 = _rhs 123400.0 |
12 | |||
7 | charValue = _rhs 'A' | 13 | charValue = _rhs 'A' |
14 | |||
8 | stringValue1 = _rhs "Hello World" | 15 | stringValue1 = _rhs "Hello World" |
16 | |||
9 | stringValue2 = _rhs "\nHello World\tagain!\r\n" | 17 | stringValue2 = _rhs "\nHello World\tagain!\r\n" |
10 | main is not found | ||
11 | ------------ trace | 18 | ------------ trace |
12 | intValue1 :: forall a . Num a => a | 19 | intValue1 :: forall a . Num a => a |
13 | intValue2 :: forall a . Num a => a | 20 | intValue2 :: forall a . Num a => a |
diff --git a/testdata/language-features/basic-values/operator01.out b/testdata/language-features/basic-values/operator01.out index b6848082..df8d10ac 100644 --- a/testdata/language-features/basic-values/operator01.out +++ b/testdata/language-features/basic-values/operator01.out | |||
@@ -1,9 +1,12 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | (#$#) = \_ _ -> _rhs HNil | 3 | (#$#) = \_ _ -> _rhs HNil |
4 | |||
3 | ($$#) = \_ _ -> _rhs HNil | 5 | ($$#) = \_ _ -> _rhs HNil |
6 | |||
4 | ($$$#) = \_ _ -> _rhs HNil | 7 | ($$$#) = \_ _ -> _rhs HNil |
8 | |||
5 | ($$$) = \_ _ -> _rhs HNil | 9 | ($$$) = \_ _ -> _rhs HNil |
6 | main is not found | ||
7 | ------------ trace | 10 | ------------ trace |
8 | (#$#) :: forall a b . a -> b -> () | 11 | (#$#) :: forall a b . a -> b -> () |
9 | ($$#) :: forall a b . a -> b -> () | 12 | ($$#) :: forall a b . a -> b -> () |
diff --git a/testdata/language-features/basic-values/operator05.out b/testdata/language-features/basic-values/operator05.out index 58ad31cd..91f34d29 100644 --- a/testdata/language-features/basic-values/operator05.out +++ b/testdata/language-features/basic-values/operator05.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 = _rhs \(a := \_ _ -> _rhs HNil) -> a HNil HNil | 3 | value1 = _rhs \(a := \_ _ -> _rhs HNil) -> a HNil HNil |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value1 :: () | 5 | value1 :: () |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/operator06.out b/testdata/language-features/basic-values/operator06.out index 6f5d6982..adbffc11 100644 --- a/testdata/language-features/basic-values/operator06.out +++ b/testdata/language-features/basic-values/operator06.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 = _rhs \(a := \_ _ -> _rhs HNil) -> a HNil HNil | 3 | value1 = _rhs \(a := \_ _ -> _rhs HNil) -> a HNil HNil |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value1 :: () | 5 | value1 :: () |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/shadowing01.out b/testdata/language-features/basic-values/shadowing01.out index 39fdca99..bf07b5e5 100644 --- a/testdata/language-features/basic-values/shadowing01.out +++ b/testdata/language-features/basic-values/shadowing01.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value | 3 | value |
3 | = _rhs | 4 | = _rhs |
@@ -10,7 +11,6 @@ value | |||
10 | (f | 11 | (f |
11 | := _rhs | 12 | := _rhs |
12 | \(g := _rhs HNil) (h := _rhs 'C') (i := _rhs 3.12) -> "world") -> HNil) -> '7' | 13 | \(g := _rhs HNil) (h := _rhs 'C') (i := _rhs 3.12) -> "world") -> HNil) -> '7' |
13 | main is not found | ||
14 | ------------ trace | 14 | ------------ trace |
15 | value :: Char | 15 | value :: Char |
16 | ------------ tooltips | 16 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/shadowing02.out b/testdata/language-features/basic-values/shadowing02.out index 4da8cccd..69f3e1f6 100644 --- a/testdata/language-features/basic-values/shadowing02.out +++ b/testdata/language-features/basic-values/shadowing02.out | |||
@@ -1,6 +1,9 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | c = _rhs (fromInt 7) | 3 | c = _rhs (fromInt 7) |
4 | |||
3 | world = _rhs "world" | 5 | world = _rhs "world" |
6 | |||
4 | value2 | 7 | value2 |
5 | = _rhs | 8 | = _rhs |
6 | \(a := _rhs 'A') | 9 | \(a := _rhs 'A') |
@@ -14,7 +17,6 @@ value2 | |||
14 | := _rhs | 17 | := _rhs |
15 | \(h := _rhs HNil) | 18 | \(h := _rhs HNil) |
16 | (i := _rhs 'C') (j := _rhs 3.12) (k := _rhs c) -> world) -> HNil) -> '7' | 19 | (i := _rhs 'C') (j := _rhs 3.12) (k := _rhs c) -> world) -> HNil) -> '7' |
17 | main is not found | ||
18 | ------------ trace | 20 | ------------ trace |
19 | c :: forall a . Num a => a | 21 | c :: forall a . Num a => a |
20 | world :: String | 22 | world :: String |
diff --git a/testdata/language-features/basic-values/shadowing03.out b/testdata/language-features/basic-values/shadowing03.out index 6e0ca5e0..00820b70 100644 --- a/testdata/language-features/basic-values/shadowing03.out +++ b/testdata/language-features/basic-values/shadowing03.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | x = \_ _ -> _rhs HNil | 3 | x = \_ _ -> _rhs HNil |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | x :: forall a b . a -> b -> () | 5 | x :: forall a b . a -> b -> () |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/shadowing04.out b/testdata/language-features/basic-values/shadowing04.out index 6d20512d..29066c7b 100644 --- a/testdata/language-features/basic-values/shadowing04.out +++ b/testdata/language-features/basic-values/shadowing04.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | __ = \_ _ -> _rhs HNil | 3 | __ = \_ _ -> _rhs HNil |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | __ :: forall a b . a -> b -> () | 5 | __ :: forall a b . a -> b -> () |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/tuple01.out b/testdata/language-features/basic-values/tuple01.out index 9ae4b926..48aa799f 100644 --- a/testdata/language-features/basic-values/tuple01.out +++ b/testdata/language-features/basic-values/tuple01.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | unit = _rhs HNil | 3 | unit = _rhs HNil |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | unit :: () | 5 | unit :: () |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/tuple02.out b/testdata/language-features/basic-values/tuple02.out index 8cdbb1b2..33a7b35c 100644 --- a/testdata/language-features/basic-values/tuple02.out +++ b/testdata/language-features/basic-values/tuple02.out | |||
@@ -1,10 +1,12 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | tuple1 | 3 | tuple1 |
3 | = _rhs | 4 | = _rhs |
4 | (HCons (fromInt 1) (HCons 2.3 (HCons 'D' (HCons "string" (HCons HNil HNil))))) | 5 | (HCons (fromInt 1) (HCons 2.3 (HCons 'D' (HCons "string" (HCons HNil HNil))))) |
6 | |||
5 | tuple2 = _rhs (HCons HNil (HCons HNil HNil)) | 7 | tuple2 = _rhs (HCons HNil (HCons HNil HNil)) |
8 | |||
6 | tuple3 = _rhs (HCons (HCons "name" (HCons 'c' HNil)) (HCons HNil HNil)) | 9 | tuple3 = _rhs (HCons (HCons "name" (HCons 'c' HNil)) (HCons HNil HNil)) |
7 | main is not found | ||
8 | ------------ trace | 10 | ------------ trace |
9 | tuple1 :: forall a . Num a => (a, Float, Char, String, ()) | 11 | tuple1 :: forall a . Num a => (a, Float, Char, String, ()) |
10 | tuple2 :: ((), ()) | 12 | tuple2 :: ((), ()) |
diff --git a/testdata/language-features/basic-values/typesig01.out b/testdata/language-features/basic-values/typesig01.out index 9936930a..4b710886 100644 --- a/testdata/language-features/basic-values/typesig01.out +++ b/testdata/language-features/basic-values/typesig01.out | |||
@@ -1,9 +1,10 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 :: Char | 3 | value1 :: Char |
3 | value1 = _rhs 'a' | 4 | value1 = _rhs 'a' |
5 | |||
4 | value2 :: Char | 6 | value2 :: Char |
5 | value2 = _rhs 'a' | 7 | value2 = _rhs 'a' |
6 | main is not found | ||
7 | ------------ trace | 8 | ------------ trace |
8 | value1 :: Char | 9 | value1 :: Char |
9 | value2 :: Char | 10 | value2 :: Char |
diff --git a/testdata/language-features/basic-values/typesig02.out b/testdata/language-features/basic-values/typesig02.out index cfd8e29d..a685db82 100644 --- a/testdata/language-features/basic-values/typesig02.out +++ b/testdata/language-features/basic-values/typesig02.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 = _rhs ('a' :: Char) | 3 | value1 = _rhs ('a' :: Char) |
4 | |||
3 | value2 = _rhs ('a' :: Char) | 5 | value2 = _rhs ('a' :: Char) |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | value1 :: Char | 7 | value1 :: Char |
7 | value2 :: Char | 8 | value2 :: Char |
diff --git a/testdata/language-features/basic-values/typesig03.out b/testdata/language-features/basic-values/typesig03.out index 8a2f8bbb..c0f5769f 100644 --- a/testdata/language-features/basic-values/typesig03.out +++ b/testdata/language-features/basic-values/typesig03.out | |||
@@ -1,9 +1,10 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun1 :: forall (a :: _) (b :: _) (c :: _) . a -> b -> c -> HList '[] | 3 | fun1 :: forall (a :: _) (b :: _) (c :: _) . a -> b -> c -> HList '[] |
3 | fun1 = \_ _ _ -> _rhs HNil | 4 | fun1 = \_ _ _ -> _rhs HNil |
5 | |||
4 | fun2 :: forall (a :: _) (b :: _) (c :: _) . a -> b -> c -> HList '[] | 6 | fun2 :: forall (a :: _) (b :: _) (c :: _) . a -> b -> c -> HList '[] |
5 | fun2 = \_ _ _ -> _rhs HNil | 7 | fun2 = \_ _ _ -> _rhs HNil |
6 | main is not found | ||
7 | ------------ trace | 8 | ------------ trace |
8 | fun1 :: forall a b c . a -> b -> c -> () | 9 | fun1 :: forall a b c . a -> b -> c -> () |
9 | fun2 :: forall a b c . a -> b -> c -> () | 10 | fun2 :: forall a b c . a -> b -> c -> () |
diff --git a/testdata/language-features/basic-values/typesig04.out b/testdata/language-features/basic-values/typesig04.out index 0c98ffa1..b7a2c6b1 100644 --- a/testdata/language-features/basic-values/typesig04.out +++ b/testdata/language-features/basic-values/typesig04.out | |||
@@ -1,9 +1,10 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun1 :: forall (a :: _) (b :: _) (c :: _) . a -> (b -> c) -> HList '[] | 3 | fun1 :: forall (a :: _) (b :: _) (c :: _) . a -> (b -> c) -> HList '[] |
3 | fun1 = \_ _ -> _rhs HNil | 4 | fun1 = \_ _ -> _rhs HNil |
5 | |||
4 | fun2 :: forall (a :: _) (b :: _) (c :: _) . a -> (b -> c) -> HList '[] | 6 | fun2 :: forall (a :: _) (b :: _) (c :: _) . a -> (b -> c) -> HList '[] |
5 | fun2 = \_ _ -> _rhs HNil | 7 | fun2 = \_ _ -> _rhs HNil |
6 | main is not found | ||
7 | ------------ trace | 8 | ------------ trace |
8 | fun1 :: forall a b c . a -> (b -> c) -> () | 9 | fun1 :: forall a b c . a -> (b -> c) -> () |
9 | fun2 :: forall a b c . a -> (b -> c) -> () | 10 | fun2 :: forall a b c . a -> (b -> c) -> () |
diff --git a/testdata/language-features/basic-values/typesig05.out b/testdata/language-features/basic-values/typesig05.out index edceee72..0f4f157e 100644 --- a/testdata/language-features/basic-values/typesig05.out +++ b/testdata/language-features/basic-values/typesig05.out | |||
@@ -1,13 +1,18 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | funL = \(a :: _) _ -> _rhs a | 3 | funL = \(a :: _) _ -> _rhs a |
4 | |||
3 | funR = \_ (a :: _) -> _rhs a | 5 | funR = \_ (a :: _) -> _rhs a |
6 | |||
4 | value1 = _rhs (funL 'a' "b" :: Char) | 7 | value1 = _rhs (funL 'a' "b" :: Char) |
8 | |||
5 | value2 = _rhs (funR 'a' "b" :: String) | 9 | value2 = _rhs (funR 'a' "b" :: String) |
10 | |||
6 | value3 :: Char | 11 | value3 :: Char |
7 | value3 = _rhs (funL 'a' "b") | 12 | value3 = _rhs (funL 'a' "b") |
13 | |||
8 | value4 :: String | 14 | value4 :: String |
9 | value4 = _rhs (funR 'a' "b") | 15 | value4 = _rhs (funR 'a' "b") |
10 | main is not found | ||
11 | ------------ trace | 16 | ------------ trace |
12 | funL :: forall a b . a -> b -> a | 17 | funL :: forall a b . a -> b -> a |
13 | funR :: forall a b . a -> b -> b | 18 | funR :: forall a b . a -> b -> b |
diff --git a/testdata/language-features/basic-values/typesig06.out b/testdata/language-features/basic-values/typesig06.out index 664b9dec..b933dda4 100644 --- a/testdata/language-features/basic-values/typesig06.out +++ b/testdata/language-features/basic-values/typesig06.out | |||
@@ -1,9 +1,12 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | funL = \(a :: _) _ -> _rhs a | 3 | funL = \(a :: _) _ -> _rhs a |
4 | |||
3 | (<@) = \(a :: _) _ -> _rhs a | 5 | (<@) = \(a :: _) _ -> _rhs a |
6 | |||
4 | value1 = _rhs ("hi" <@ 1.2 :: String) | 7 | value1 = _rhs ("hi" <@ 1.2 :: String) |
8 | |||
5 | value2 = _rhs ("hi" `funL` 1.2 :: String) | 9 | value2 = _rhs ("hi" `funL` 1.2 :: String) |
6 | main is not found | ||
7 | ------------ trace | 10 | ------------ trace |
8 | funL :: forall a b . a -> b -> a | 11 | funL :: forall a b . a -> b -> a |
9 | (<@) :: forall a b . a -> b -> a | 12 | (<@) :: forall a b . a -> b -> a |
diff --git a/testdata/language-features/basic-values/typesig07.out b/testdata/language-features/basic-values/typesig07.out index 07a8d0b9..f300eced 100644 --- a/testdata/language-features/basic-values/typesig07.out +++ b/testdata/language-features/basic-values/typesig07.out | |||
@@ -1,17 +1,22 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 :: Int | 3 | value1 :: Int |
3 | value1 = _rhs (fromInt 1) | 4 | value1 = _rhs (fromInt 1) |
5 | |||
4 | value2 :: Int | 6 | value2 :: Int |
5 | value2 = _rhs (fromInt 2) | 7 | value2 = _rhs (fromInt 2) |
8 | |||
6 | value3 :: Int | 9 | value3 :: Int |
7 | value3 = _rhs (fromInt 3) | 10 | value3 = _rhs (fromInt 3) |
11 | |||
8 | value4 :: HList '[] -> HList '[] -> HList '[] | 12 | value4 :: HList '[] -> HList '[] -> HList '[] |
9 | value4 = \_ _ -> _rhs HNil | 13 | value4 = \_ _ -> _rhs HNil |
14 | |||
10 | (@@@) :: HList '[] -> HList '[] -> HList '[] | 15 | (@@@) :: HList '[] -> HList '[] -> HList '[] |
11 | (@@@) = \_ _ -> _rhs HNil | 16 | (@@@) = \_ _ -> _rhs HNil |
17 | |||
12 | value6 :: HList '[] -> HList '[] -> HList '[] | 18 | value6 :: HList '[] -> HList '[] -> HList '[] |
13 | value6 = \_ _ -> _rhs HNil | 19 | value6 = \_ _ -> _rhs HNil |
14 | main is not found | ||
15 | ------------ trace | 20 | ------------ trace |
16 | value1 :: Int | 21 | value1 :: Int |
17 | value2 :: Int | 22 | value2 :: Int |
diff --git a/testdata/language-features/basic-values/typesyn01.out b/testdata/language-features/basic-values/typesyn01.out index 1b35d979..9481b2bf 100644 --- a/testdata/language-features/basic-values/typesyn01.out +++ b/testdata/language-features/basic-values/typesyn01.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | 'MyUnit = _rhs ('HList []) | 3 | 'MyUnit = _rhs ('HList []) |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | 'MyUnit :: Type | 5 | 'MyUnit :: Type |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/basic-values/typesyn02.out b/testdata/language-features/basic-values/typesyn02.out index 7713c92a..74f2b730 100644 --- a/testdata/language-features/basic-values/typesyn02.out +++ b/testdata/language-features/basic-values/typesyn02.out | |||
@@ -1,8 +1,9 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | 'MyUnit = _rhs ('HList []) | 3 | 'MyUnit = _rhs ('HList []) |
4 | |||
3 | fun :: forall (a :: _) . a -> MyUnit -> MyUnit | 5 | fun :: forall (a :: _) . a -> MyUnit -> MyUnit |
4 | fun = \_ (a :: _) -> hlistNilCase _ (_rhs HNil) a | 6 | fun = \_ (a :: _) -> hlistNilCase _ (_rhs HNil) a |
5 | main is not found | ||
6 | ------------ trace | 7 | ------------ trace |
7 | 'MyUnit :: Type | 8 | 'MyUnit :: Type |
8 | fun :: forall a . a -> () -> () | 9 | fun :: forall a . a -> () -> () |
diff --git a/testdata/language-features/basic-values/where01.out b/testdata/language-features/basic-values/where01.out index 9ff7eb28..d278100a 100644 --- a/testdata/language-features/basic-values/where01.out +++ b/testdata/language-features/basic-values/where01.out | |||
@@ -1,16 +1,26 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 = _rhs \(a := _rhs HNil) -> HNil | 3 | value1 = _rhs \(a := _rhs HNil) -> HNil |
4 | |||
3 | value2 = _rhs \(a := _rhs HNil) -> a | 5 | value2 = _rhs \(a := _rhs HNil) -> a |
6 | |||
4 | value3 = _rhs \(a := _rhs HNil) (b := _rhs HNil) -> a | 7 | value3 = _rhs \(a := _rhs HNil) (b := _rhs HNil) -> a |
8 | |||
5 | value4 = _rhs \(a := _rhs HNil) (b := _rhs HNil) -> b | 9 | value4 = _rhs \(a := _rhs HNil) (b := _rhs HNil) -> b |
10 | |||
6 | value5 = _rhs \(a := _rhs HNil) (b := _rhs HNil) -> a | 11 | value5 = _rhs \(a := _rhs HNil) (b := _rhs HNil) -> a |
12 | |||
7 | value6 = _rhs HNil | 13 | value6 = _rhs HNil |
14 | |||
8 | value7 = _rhs HNil | 15 | value7 = _rhs HNil |
16 | |||
9 | value8 = _rhs HNil | 17 | value8 = _rhs HNil |
18 | |||
10 | value9 = _rhs \(a := _rhs HNil) (b := _rhs HNil) -> a | 19 | value9 = _rhs \(a := _rhs HNil) (b := _rhs HNil) -> a |
20 | |||
11 | value10 = _rhs \(a := _rhs HNil) (b := _rhs HNil) -> a | 21 | value10 = _rhs \(a := _rhs HNil) (b := _rhs HNil) -> a |
22 | |||
12 | value11 = _rhs \(a := _rhs HNil) (b := _rhs HNil) -> a | 23 | value11 = _rhs \(a := _rhs HNil) (b := _rhs HNil) -> a |
13 | main is not found | ||
14 | ------------ trace | 24 | ------------ trace |
15 | value1 :: () | 25 | value1 :: () |
16 | value2 :: () | 26 | value2 :: () |
diff --git a/testdata/language-features/basic-values/where04.out b/testdata/language-features/basic-values/where04.out index f5e16747..39410991 100644 --- a/testdata/language-features/basic-values/where04.out +++ b/testdata/language-features/basic-values/where04.out | |||
@@ -1,8 +1,10 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 = _rhs \(a := _rhs \(b := _rhs HNil) -> b) -> a | 3 | value1 = _rhs \(a := _rhs \(b := _rhs HNil) -> b) -> a |
4 | |||
3 | value2 = _rhs \(a := _rhs \(b := _rhs HNil) -> b) -> a | 5 | value2 = _rhs \(a := _rhs \(b := _rhs HNil) -> b) -> a |
6 | |||
4 | value3 = _rhs \(a := _rhs \(b := _rhs HNil) -> b) -> a | 7 | value3 = _rhs \(a := _rhs \(b := _rhs HNil) -> b) -> a |
5 | main is not found | ||
6 | ------------ trace | 8 | ------------ trace |
7 | value1 :: () | 9 | value1 :: () |
8 | value2 :: () | 10 | value2 :: () |
diff --git a/testdata/language-features/basic-values/where05.out b/testdata/language-features/basic-values/where05.out index 8c082555..08d64648 100644 --- a/testdata/language-features/basic-values/where05.out +++ b/testdata/language-features/basic-values/where05.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value1 | 3 | value1 |
3 | = _rhs | 4 | = _rhs |
@@ -7,6 +8,7 @@ value1 | |||
7 | (\(b := _rhs HNil) -> b) | 8 | (\(b := _rhs HNil) -> b) |
8 | (fromInt 1 == a)) | 9 | (fromInt 1 == a)) |
9 | (fromInt 1)) | 10 | (fromInt 1)) |
11 | |||
10 | value2 | 12 | value2 |
11 | = _rhs | 13 | = _rhs |
12 | ((\(a :: _) -> case'Bool | 14 | ((\(a :: _) -> case'Bool |
@@ -15,6 +17,7 @@ value2 | |||
15 | (\(b := _rhs HNil) -> b) | 17 | (\(b := _rhs HNil) -> b) |
16 | (fromInt 1 == a)) | 18 | (fromInt 1 == a)) |
17 | (fromInt 1)) | 19 | (fromInt 1)) |
20 | |||
18 | value3 | 21 | value3 |
19 | = _rhs | 22 | = _rhs |
20 | ((\(a :: _) -> case'Bool | 23 | ((\(a :: _) -> case'Bool |
@@ -23,11 +26,11 @@ value3 | |||
23 | (\(b := _rhs HNil) -> b) | 26 | (\(b := _rhs HNil) -> b) |
24 | (fromInt 1 == a)) | 27 | (fromInt 1 == a)) |
25 | (fromInt 1)) | 28 | (fromInt 1)) |
29 | |||
26 | value4 | 30 | value4 |
27 | = _rhs | 31 | = _rhs |
28 | \(a := _rhs HNil) -> (\(b :: _) -> case'Bool (\_ -> _) HNil a (fromInt 1 == b)) | 32 | \(a := _rhs HNil) -> (\(b :: _) -> case'Bool (\_ -> _) HNil a (fromInt 1 == b)) |
29 | (fromInt 1) | 33 | (fromInt 1) |
30 | main is not found | ||
31 | ------------ trace | 34 | ------------ trace |
32 | value1 :: forall a . (Eq a, Num a) => () | 35 | value1 :: forall a . (Eq a, Num a) => () |
33 | value2 :: forall a . (Eq a, Num a) => () | 36 | value2 :: forall a . (Eq a, Num a) => () |
diff --git a/testdata/language-features/basic-values/wildcard01.out b/testdata/language-features/basic-values/wildcard01.out index 61b6a8c4..49f84c4b 100644 --- a/testdata/language-features/basic-values/wildcard01.out +++ b/testdata/language-features/basic-values/wildcard01.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | funUnit = \_ -> _rhs HNil | 3 | funUnit = \_ -> _rhs HNil |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | funUnit :: forall a . a -> () | 5 | funUnit :: forall a . a -> () |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/comment/comment01.out b/testdata/language-features/comment/comment01.out index 907bca84..521dcdfe 100644 --- a/testdata/language-features/comment/comment01.out +++ b/testdata/language-features/comment/comment01.out | |||
@@ -1,2 +1,2 @@ | |||
1 | ------------ desugared source code | ||
2 | main is not found | 1 | main is not found |
2 | ------------ desugared source code \ No newline at end of file | ||
diff --git a/testdata/language-features/comment/comment02.out b/testdata/language-features/comment/comment02.out index 907bca84..521dcdfe 100644 --- a/testdata/language-features/comment/comment02.out +++ b/testdata/language-features/comment/comment02.out | |||
@@ -1,2 +1,2 @@ | |||
1 | ------------ desugared source code | ||
2 | main is not found | 1 | main is not found |
2 | ------------ desugared source code \ No newline at end of file | ||
diff --git a/testdata/language-features/comment/comment03.out b/testdata/language-features/comment/comment03.out index 907bca84..521dcdfe 100644 --- a/testdata/language-features/comment/comment03.out +++ b/testdata/language-features/comment/comment03.out | |||
@@ -1,2 +1,2 @@ | |||
1 | ------------ desugared source code | ||
2 | main is not found | 1 | main is not found |
2 | ------------ desugared source code \ No newline at end of file | ||
diff --git a/testdata/language-features/comment/comment04.out b/testdata/language-features/comment/comment04.out index 907bca84..521dcdfe 100644 --- a/testdata/language-features/comment/comment04.out +++ b/testdata/language-features/comment/comment04.out | |||
@@ -1,2 +1,2 @@ | |||
1 | ------------ desugared source code | ||
2 | main is not found | 1 | main is not found |
2 | ------------ desugared source code \ No newline at end of file | ||
diff --git a/testdata/language-features/emptysource.out b/testdata/language-features/emptysource.out index 907bca84..521dcdfe 100644 --- a/testdata/language-features/emptysource.out +++ b/testdata/language-features/emptysource.out | |||
@@ -1,2 +1,2 @@ | |||
1 | ------------ desugared source code | ||
2 | main is not found | 1 | main is not found |
2 | ------------ desugared source code \ No newline at end of file | ||
diff --git a/testdata/language-features/guard/guard01.out b/testdata/language-features/guard/guard01.out index b4195756..1405debb 100644 --- a/testdata/language-features/guard/guard01.out +++ b/testdata/language-features/guard/guard01.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = case'Bool (\_ -> _) (_rhs undefined) (_rhs HNil) True | 3 | value = case'Bool (\_ -> _) (_rhs undefined) (_rhs HNil) True |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: () | 5 | value :: () |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/guard/guard03.out b/testdata/language-features/guard/guard03.out index 7d7f8a4d..6540522a 100644 --- a/testdata/language-features/guard/guard03.out +++ b/testdata/language-features/guard/guard03.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value | 3 | value |
3 | = case'Bool | 4 | = case'Bool |
@@ -5,7 +6,6 @@ value | |||
5 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs "False") False) | 6 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs "False") False) |
6 | (_rhs "True") | 7 | (_rhs "True") |
7 | True | 8 | True |
8 | main is not found | ||
9 | ------------ trace | 9 | ------------ trace |
10 | value :: String | 10 | value :: String |
11 | ------------ tooltips | 11 | ------------ tooltips |
diff --git a/testdata/language-features/guard/guard04.out b/testdata/language-features/guard/guard04.out index 21a9ff19..5b55275b 100644 --- a/testdata/language-features/guard/guard04.out +++ b/testdata/language-features/guard/guard04.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = case'Bool (\_ -> _) (_rhs "False") (_rhs "True") True | 3 | value = case'Bool (\_ -> _) (_rhs "False") (_rhs "True") True |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: String | 5 | value :: String |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/guard/guard06.out b/testdata/language-features/guard/guard06.out index a62258cc..c568bf3c 100644 --- a/testdata/language-features/guard/guard06.out +++ b/testdata/language-features/guard/guard06.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs HNil | 3 | value = _rhs HNil |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: () | 5 | value :: () |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/guard/guard07.out b/testdata/language-features/guard/guard07.out index acc704ba..acd4ea18 100644 --- a/testdata/language-features/guard/guard07.out +++ b/testdata/language-features/guard/guard07.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value | 3 | value |
3 | = case'Bool | 4 | = case'Bool |
@@ -5,7 +6,6 @@ value | |||
5 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs "False") False) | 6 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs "False") False) |
6 | (_rhs "True") | 7 | (_rhs "True") |
7 | True | 8 | True |
8 | main is not found | ||
9 | ------------ trace | 9 | ------------ trace |
10 | value :: String | 10 | value :: String |
11 | ------------ tooltips | 11 | ------------ tooltips |
diff --git a/testdata/language-features/guard/guard08.out b/testdata/language-features/guard/guard08.out index eeef1da6..1f5e5ab3 100644 --- a/testdata/language-features/guard/guard08.out +++ b/testdata/language-features/guard/guard08.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value | 3 | value |
3 | = case'Bool | 4 | = case'Bool |
@@ -5,7 +6,6 @@ value | |||
5 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs "False") False) | 6 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs "False") False) |
6 | (_rhs "True") | 7 | (_rhs "True") |
7 | True | 8 | True |
8 | main is not found | ||
9 | ------------ trace | 9 | ------------ trace |
10 | value :: String | 10 | value :: String |
11 | ------------ tooltips | 11 | ------------ tooltips |
diff --git a/testdata/language-features/guard/guard09.out b/testdata/language-features/guard/guard09.out index 09a72fa0..1aa3c7a2 100644 --- a/testdata/language-features/guard/guard09.out +++ b/testdata/language-features/guard/guard09.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value | 3 | value |
3 | = case'Bool | 4 | = case'Bool |
@@ -5,7 +6,6 @@ value | |||
5 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs "False") False) | 6 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs "False") False) |
6 | (_rhs "True") | 7 | (_rhs "True") |
7 | True | 8 | True |
8 | main is not found | ||
9 | ------------ trace | 9 | ------------ trace |
10 | value :: String | 10 | value :: String |
11 | ------------ tooltips | 11 | ------------ tooltips |
diff --git a/testdata/language-features/guard/guard11.out b/testdata/language-features/guard/guard11.out index 1d173fb2..b8449128 100644 --- a/testdata/language-features/guard/guard11.out +++ b/testdata/language-features/guard/guard11.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun = \(a :: _) -> case'Bool (\_ -> _) (_rhs "False") (_rhs "True") a | 3 | fun = \(a :: _) -> case'Bool (\_ -> _) (_rhs "False") (_rhs "True") a |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | fun :: Bool -> String | 5 | fun :: Bool -> String |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/guard/guard13.out b/testdata/language-features/guard/guard13.out index e8bd4c84..3c1e364a 100644 --- a/testdata/language-features/guard/guard13.out +++ b/testdata/language-features/guard/guard13.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun = \(a :: _) -> case'Bool (\_ -> _) (_rhs HNil) (_rhs HNil) a | 3 | fun = \(a :: _) -> case'Bool (\_ -> _) (_rhs HNil) (_rhs HNil) a |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | fun :: Bool -> () | 5 | fun :: Bool -> () |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/guard/guard14.out b/testdata/language-features/guard/guard14.out index e0b32348..a5a039bf 100644 --- a/testdata/language-features/guard/guard14.out +++ b/testdata/language-features/guard/guard14.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs \(a := case'Bool (\_ -> _) (_rhs HNil) (_rhs HNil) True) -> HNil | 3 | value = _rhs \(a := case'Bool (\_ -> _) (_rhs HNil) (_rhs HNil) True) -> HNil |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: () | 5 | value :: () |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/guard/guard15.out b/testdata/language-features/guard/guard15.out index 733c2b34..5c7fc3b8 100644 --- a/testdata/language-features/guard/guard15.out +++ b/testdata/language-features/guard/guard15.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs \(a := case'Bool (\_ -> _) (_rhs HNil) (_rhs HNil) True) -> HNil | 3 | value = _rhs \(a := case'Bool (\_ -> _) (_rhs HNil) (_rhs HNil) True) -> HNil |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | value :: () | 5 | value :: () |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/guard/guard16.out b/testdata/language-features/guard/guard16.out index 4fc90e30..311d7db0 100644 --- a/testdata/language-features/guard/guard16.out +++ b/testdata/language-features/guard/guard16.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value | 3 | value |
3 | = _rhs | 4 | = _rhs |
@@ -7,7 +8,6 @@ value | |||
7 | (case'Bool (\_ -> _) HNil HNil True) | 8 | (case'Bool (\_ -> _) HNil HNil True) |
8 | (fromInt 1 == a)) | 9 | (fromInt 1 == a)) |
9 | (fromInt 1)) | 10 | (fromInt 1)) |
10 | main is not found | ||
11 | ------------ trace | 11 | ------------ trace |
12 | value :: forall a . (Eq a, Num a) => () | 12 | value :: forall a . (Eq a, Num a) => () |
13 | ------------ tooltips | 13 | ------------ tooltips |
diff --git a/testdata/language-features/module/Hello01.out b/testdata/language-features/module/Hello01.out index aee194f1..34f3f918 100644 --- a/testdata/language-features/module/Hello01.out +++ b/testdata/language-features/module/Hello01.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | hello = _rhs "hello" | 3 | hello = _rhs "hello" |
4 | |||
3 | world = _rhs "world" | 5 | world = _rhs "world" |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | hello :: String | 7 | hello :: String |
7 | world :: String | 8 | world :: String |
diff --git a/testdata/language-features/module/Hello02.out b/testdata/language-features/module/Hello02.out index 9d582484..fc3a7be7 100644 --- a/testdata/language-features/module/Hello02.out +++ b/testdata/language-features/module/Hello02.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | hello = _rhs "hello" | 3 | hello = _rhs "hello" |
4 | |||
3 | world = _rhs "world" | 5 | world = _rhs "world" |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | hello :: String | 7 | hello :: String |
7 | world :: String | 8 | world :: String |
diff --git a/testdata/language-features/module/Hello03.out b/testdata/language-features/module/Hello03.out index 98956c8a..8a645fda 100644 --- a/testdata/language-features/module/Hello03.out +++ b/testdata/language-features/module/Hello03.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | greeting = _rhs 'G' | 3 | greeting = _rhs 'G' |
4 | |||
3 | value = _rhs 12.2 | 5 | value = _rhs 12.2 |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | greeting :: Char | 7 | greeting :: Char |
7 | value :: Float | 8 | value :: Float |
diff --git a/testdata/language-features/module/ModulePackage/SubModule01.out b/testdata/language-features/module/ModulePackage/SubModule01.out index 44457c17..119eaeac 100644 --- a/testdata/language-features/module/ModulePackage/SubModule01.out +++ b/testdata/language-features/module/ModulePackage/SubModule01.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | hello = _rhs "Hello" | 3 | hello = _rhs "Hello" |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | hello :: String | 5 | hello :: String |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/module/Moduledef01.out b/testdata/language-features/module/Moduledef01.out index 907bca84..521dcdfe 100644 --- a/testdata/language-features/module/Moduledef01.out +++ b/testdata/language-features/module/Moduledef01.out | |||
@@ -1,2 +1,2 @@ | |||
1 | ------------ desugared source code | ||
2 | main is not found | 1 | main is not found |
2 | ------------ desugared source code \ No newline at end of file | ||
diff --git a/testdata/language-features/module/Moduledef06.out b/testdata/language-features/module/Moduledef06.out index 95f989ee..ef523d5a 100644 --- a/testdata/language-features/module/Moduledef06.out +++ b/testdata/language-features/module/Moduledef06.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | hello = _rhs "hello" | 3 | hello = _rhs "hello" |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | hello :: String | 5 | hello :: String |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/module/Moduledef07.out b/testdata/language-features/module/Moduledef07.out index 0dafaaa8..ac2aa83e 100644 --- a/testdata/language-features/module/Moduledef07.out +++ b/testdata/language-features/module/Moduledef07.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | hello = _rhs "hello" | 3 | hello = _rhs "hello" |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | hello :: String | 5 | hello :: String |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/module/Moduledef08.out b/testdata/language-features/module/Moduledef08.out index d7add14b..e2b3e946 100644 --- a/testdata/language-features/module/Moduledef08.out +++ b/testdata/language-features/module/Moduledef08.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | hello = _rhs "hello" | 3 | hello = _rhs "hello" |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | hello :: String | 5 | hello :: String |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/module/Moduledef09.out b/testdata/language-features/module/Moduledef09.out index f90be0b2..503326bb 100644 --- a/testdata/language-features/module/Moduledef09.out +++ b/testdata/language-features/module/Moduledef09.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | hello = _rhs "hello" | 3 | hello = _rhs "hello" |
4 | |||
3 | world = _rhs "world" | 5 | world = _rhs "world" |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | hello :: String | 7 | hello :: String |
7 | world :: String | 8 | world :: String |
diff --git a/testdata/language-features/module/Moduledef10.out b/testdata/language-features/module/Moduledef10.out index 2928a534..42b98df9 100644 --- a/testdata/language-features/module/Moduledef10.out +++ b/testdata/language-features/module/Moduledef10.out | |||
@@ -1,8 +1,10 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | hello = _rhs "hello" | 3 | hello = _rhs "hello" |
4 | |||
3 | world = _rhs "world" | 5 | world = _rhs "world" |
6 | |||
4 | value = _rhs HNil | 7 | value = _rhs HNil |
5 | main is not found | ||
6 | ------------ trace | 8 | ------------ trace |
7 | hello :: String | 9 | hello :: String |
8 | world :: String | 10 | world :: String |
diff --git a/testdata/language-features/module/Moduledef13.out b/testdata/language-features/module/Moduledef13.out index 7b6fb91d..90ae50c7 100644 --- a/testdata/language-features/module/Moduledef13.out +++ b/testdata/language-features/module/Moduledef13.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | hello = _rhs "hello" | 3 | hello = _rhs "hello" |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | hello :: String | 5 | hello :: String |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/module/TypeSyn01Mod.out b/testdata/language-features/module/TypeSyn01Mod.out index a43e184e..51565796 100644 --- a/testdata/language-features/module/TypeSyn01Mod.out +++ b/testdata/language-features/module/TypeSyn01Mod.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | 'MyUnit = _rhs ('HList []) | 3 | 'MyUnit = _rhs ('HList []) |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | 'MyUnit :: Type | 5 | 'MyUnit :: Type |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/module/import01.out b/testdata/language-features/module/import01.out index 0c9e505e..531eae39 100644 --- a/testdata/language-features/module/import01.out +++ b/testdata/language-features/module/import01.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | x = _rhs hello | 3 | x = _rhs hello |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | x :: String | 5 | x :: String |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/module/import05.out b/testdata/language-features/module/import05.out index 4cb3a2f4..9dfe0dba 100644 --- a/testdata/language-features/module/import05.out +++ b/testdata/language-features/module/import05.out | |||
@@ -1,7 +1,7 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | x :: String | 3 | x :: String |
3 | x = _rhs hello | 4 | x = _rhs hello |
4 | main is not found | ||
5 | ------------ trace | 5 | ------------ trace |
6 | x :: String | 6 | x :: String |
7 | ------------ tooltips | 7 | ------------ tooltips |
diff --git a/testdata/language-features/module/import06.out b/testdata/language-features/module/import06.out index a8852987..fd792bd3 100644 --- a/testdata/language-features/module/import06.out +++ b/testdata/language-features/module/import06.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | hello = _rhs HNil | 3 | hello = _rhs HNil |
4 | |||
3 | x = _rhs world | 5 | x = _rhs world |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | hello :: () | 7 | hello :: () |
7 | x :: String | 8 | x :: String |
diff --git a/testdata/language-features/module/import07.out b/testdata/language-features/module/import07.out index c9285662..4bb045c3 100644 --- a/testdata/language-features/module/import07.out +++ b/testdata/language-features/module/import07.out | |||
@@ -1,7 +1,8 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | hello = _rhs HNil | 3 | hello = _rhs HNil |
4 | |||
3 | x = _rhs world | 5 | x = _rhs world |
4 | main is not found | ||
5 | ------------ trace | 6 | ------------ trace |
6 | hello :: () | 7 | hello :: () |
7 | x :: String | 8 | x :: String |
diff --git a/testdata/language-features/module/import08.out b/testdata/language-features/module/import08.out index ce0235db..aad9ca58 100644 --- a/testdata/language-features/module/import08.out +++ b/testdata/language-features/module/import08.out | |||
@@ -1,12 +1,15 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value = _rhs HNil | 3 | value = _rhs HNil |
4 | |||
3 | g :: Char | 5 | g :: Char |
4 | g = _rhs greeting | 6 | g = _rhs greeting |
7 | |||
5 | h :: String | 8 | h :: String |
6 | h = _rhs hello | 9 | h = _rhs hello |
10 | |||
7 | w :: String | 11 | w :: String |
8 | w = _rhs world | 12 | w = _rhs world |
9 | main is not found | ||
10 | ------------ trace | 13 | ------------ trace |
11 | value :: () | 14 | value :: () |
12 | g :: Char | 15 | g :: Char |
diff --git a/testdata/language-features/module/import09.out b/testdata/language-features/module/import09.out index 42b1de3a..12e13325 100644 --- a/testdata/language-features/module/import09.out +++ b/testdata/language-features/module/import09.out | |||
@@ -1,7 +1,7 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun :: forall (a :: _) . a -> MyUnit -> MyUnit | 3 | fun :: forall (a :: _) . a -> MyUnit -> MyUnit |
3 | fun = \_ (a :: _) -> hlistNilCase _ (_rhs HNil) a | 4 | fun = \_ (a :: _) -> hlistNilCase _ (_rhs HNil) a |
4 | main is not found | ||
5 | ------------ trace | 5 | ------------ trace |
6 | fun :: forall a . a -> () -> () | 6 | fun :: forall a . a -> () -> () |
7 | ------------ tooltips | 7 | ------------ tooltips |
diff --git a/testdata/language-features/module/import12.out b/testdata/language-features/module/import12.out index 32b7bdd8..df4d894b 100644 --- a/testdata/language-features/module/import12.out +++ b/testdata/language-features/module/import12.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun = _rhs hello | 3 | fun = _rhs hello |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | fun :: String | 5 | fun :: String |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/module/import13.out b/testdata/language-features/module/import13.out index 7167ad27..68ed44d8 100644 --- a/testdata/language-features/module/import13.out +++ b/testdata/language-features/module/import13.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun = _rhs hello | 3 | fun = _rhs hello |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | fun :: String | 5 | fun :: String |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/module/import14.out b/testdata/language-features/module/import14.out index 19d18b88..958207ba 100644 --- a/testdata/language-features/module/import14.out +++ b/testdata/language-features/module/import14.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun = _rhs hello | 3 | fun = _rhs hello |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | fun :: String | 5 | fun :: String |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/module/import15.out b/testdata/language-features/module/import15.out index bb60b565..8727ac08 100644 --- a/testdata/language-features/module/import15.out +++ b/testdata/language-features/module/import15.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun = _rhs hello | 3 | fun = _rhs hello |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | fun :: String | 5 | fun :: String |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/pattern/pattern01.out b/testdata/language-features/pattern/pattern01.out index 1683fdec..eeda616d 100644 --- a/testdata/language-features/pattern/pattern01.out +++ b/testdata/language-features/pattern/pattern01.out | |||
@@ -1,9 +1,12 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun1 = \(a :: _) -> case'Bool (\_ -> _) (_rhs '_') (_rhs '0') (fromInt 0 == a) | 3 | fun1 = \(a :: _) -> case'Bool (\_ -> _) (_rhs '_') (_rhs '0') (fromInt 0 == a) |
4 | |||
3 | fun2 = \(a :: _) -> case'Bool (\_ -> _) (_rhs '_') (_rhs '0') ("0" == a) | 5 | fun2 = \(a :: _) -> case'Bool (\_ -> _) (_rhs '_') (_rhs '0') ("0" == a) |
6 | |||
4 | fun3 = \(a :: _) -> case'Bool (\_ -> _) (_rhs '_') (_rhs '0') ('0' == a) | 7 | fun3 = \(a :: _) -> case'Bool (\_ -> _) (_rhs '_') (_rhs '0') ('0' == a) |
8 | |||
5 | fun4 = \(a :: _) -> hlistNilCase _ (_rhs '0') a | 9 | fun4 = \(a :: _) -> hlistNilCase _ (_rhs '0') a |
6 | main is not found | ||
7 | ------------ trace | 10 | ------------ trace |
8 | fun1 :: forall a . (Eq a, Num a) => a -> Char | 11 | fun1 :: forall a . (Eq a, Num a) => a -> Char |
9 | fun2 :: String -> Char | 12 | fun2 :: String -> Char |
diff --git a/testdata/language-features/pattern/uncovered.out b/testdata/language-features/pattern/uncovered.out index 531a913a..4302e4ac 100644 --- a/testdata/language-features/pattern/uncovered.out +++ b/testdata/language-features/pattern/uncovered.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | f | 3 | f |
3 | = \(a :: _) (b :: _) (c :: _) -> case'Bool | 4 | = \(a :: _) (b :: _) (c :: _) -> case'Bool |
@@ -13,6 +14,7 @@ f | |||
13 | (case'Bool (\_ -> _) (_rhs (fromInt 1)) (_rhs undefined) a) | 14 | (case'Bool (\_ -> _) (_rhs (fromInt 1)) (_rhs undefined) a) |
14 | c) | 15 | c) |
15 | b | 16 | b |
17 | |||
16 | g | 18 | g |
17 | = \(a :: _) -> case'List | 19 | = \(a :: _) -> case'List |
18 | (\_ -> _) | 20 | (\_ -> _) |
@@ -39,6 +41,7 @@ g | |||
39 | c) | 41 | c) |
40 | b) | 42 | b) |
41 | a | 43 | a |
44 | |||
42 | h | 45 | h |
43 | = \(a :: _) -> case'List | 46 | = \(a :: _) -> case'List |
44 | (\_ -> _) | 47 | (\_ -> _) |
@@ -73,7 +76,6 @@ h | |||
73 | d) | 76 | d) |
74 | b) | 77 | b) |
75 | a | 78 | a |
76 | main is not found | ||
77 | ------------ trace | 79 | ------------ trace |
78 | f :: forall a . Num a => Bool -> Bool -> Bool -> a | 80 | f :: forall a . Num a => Bool -> Bool -> Bool -> a |
79 | g :: [Bool] -> Bool | 81 | g :: [Bool] -> Bool |
diff --git a/testdata/language-features/pattern/unreachable.out b/testdata/language-features/pattern/unreachable.out index 06c9ca43..f7961855 100644 --- a/testdata/language-features/pattern/unreachable.out +++ b/testdata/language-features/pattern/unreachable.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | f = \_ -> _rhs "hello" | 3 | f = \_ -> _rhs "hello" |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | f :: forall a . a -> String | 5 | f :: forall a . a -> String |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/language-features/pragma/pragma01.out b/testdata/language-features/pragma/pragma01.out index 907bca84..521dcdfe 100644 --- a/testdata/language-features/pragma/pragma01.out +++ b/testdata/language-features/pragma/pragma01.out | |||
@@ -1,2 +1,2 @@ | |||
1 | ------------ desugared source code | ||
2 | main is not found | 1 | main is not found |
2 | ------------ desugared source code \ No newline at end of file | ||
diff --git a/testdata/language-features/pragma/pragma02.out b/testdata/language-features/pragma/pragma02.out index 907bca84..521dcdfe 100644 --- a/testdata/language-features/pragma/pragma02.out +++ b/testdata/language-features/pragma/pragma02.out | |||
@@ -1,2 +1,2 @@ | |||
1 | ------------ desugared source code | ||
2 | main is not found | 1 | main is not found |
2 | ------------ desugared source code \ No newline at end of file | ||
diff --git a/testdata/language-features/pragma/pragma03.out b/testdata/language-features/pragma/pragma03.out index 907bca84..521dcdfe 100644 --- a/testdata/language-features/pragma/pragma03.out +++ b/testdata/language-features/pragma/pragma03.out | |||
@@ -1,2 +1,2 @@ | |||
1 | ------------ desugared source code | ||
2 | main is not found | 1 | main is not found |
2 | ------------ desugared source code \ No newline at end of file | ||
diff --git a/testdata/language-features/pragma/pragma04.out b/testdata/language-features/pragma/pragma04.out index 907bca84..521dcdfe 100644 --- a/testdata/language-features/pragma/pragma04.out +++ b/testdata/language-features/pragma/pragma04.out | |||
@@ -1,2 +1,2 @@ | |||
1 | ------------ desugared source code | ||
2 | main is not found | 1 | main is not found |
2 | ------------ desugared source code \ No newline at end of file | ||
diff --git a/testdata/language-features/recursion/simplerec01.out b/testdata/language-features/recursion/simplerec01.out index 89006870..656adc64 100644 --- a/testdata/language-features/recursion/simplerec01.out +++ b/testdata/language-features/recursion/simplerec01.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun | 3 | fun |
3 | = \(a :: _) -> case'Bool | 4 | = \(a :: _) -> case'Bool |
@@ -5,7 +6,6 @@ fun | |||
5 | (_rhs (fun (fromInt 0))) | 6 | (_rhs (fun (fromInt 0))) |
6 | (_rhs 'a') | 7 | (_rhs 'a') |
7 | (fromInt 0 == a) | 8 | (fromInt 0 == a) |
8 | main is not found | ||
9 | ------------ trace | 9 | ------------ trace |
10 | fun :: forall a . (Num a, Eq a, Num a) => a -> Char | 10 | fun :: forall a . (Num a, Eq a, Num a) => a -> Char |
11 | ------------ tooltips | 11 | ------------ tooltips |
diff --git a/testdata/language-features/recursion/simplerec02.out b/testdata/language-features/recursion/simplerec02.out index 7f24ea1c..c0d26e86 100644 --- a/testdata/language-features/recursion/simplerec02.out +++ b/testdata/language-features/recursion/simplerec02.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value | 3 | value |
3 | = _rhs | 4 | = _rhs |
@@ -8,7 +9,6 @@ value | |||
8 | (_rhs (b (fromInt 0))) | 9 | (_rhs (b (fromInt 0))) |
9 | (_rhs 'a') | 10 | (_rhs 'a') |
10 | (fromInt 0 == c)) -> HNil | 11 | (fromInt 0 == c)) -> HNil |
11 | main is not found | ||
12 | ------------ trace | 12 | ------------ trace |
13 | value :: () | 13 | value :: () |
14 | ------------ tooltips | 14 | ------------ tooltips |
diff --git a/testdata/language-features/recursion/simplerec03.out b/testdata/language-features/recursion/simplerec03.out index 512baba5..5c4f7185 100644 --- a/testdata/language-features/recursion/simplerec03.out +++ b/testdata/language-features/recursion/simplerec03.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | value | 3 | value |
3 | = _rhs | 4 | = _rhs |
@@ -8,7 +9,6 @@ value | |||
8 | (_rhs (b (fromInt 0))) | 9 | (_rhs (b (fromInt 0))) |
9 | (_rhs 'a') | 10 | (_rhs 'a') |
10 | (fromInt 0 == c)) -> HNil | 11 | (fromInt 0 == c)) -> HNil |
11 | main is not found | ||
12 | ------------ trace | 12 | ------------ trace |
13 | value :: () | 13 | value :: () |
14 | ------------ tooltips | 14 | ------------ tooltips |
diff --git a/testdata/language-features/section/section01.out b/testdata/language-features/section/section01.out index dd5e5093..a502f9f5 100644 --- a/testdata/language-features/section/section01.out +++ b/testdata/language-features/section/section01.out | |||
@@ -1,8 +1,10 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | (!@!) = \_ _ -> _rhs HNil | 3 | (!@!) = \_ _ -> _rhs HNil |
4 | |||
3 | value1 = \(a :: _) -> _rhs \(b :: _) -> a !@! b | 5 | value1 = \(a :: _) -> _rhs \(b :: _) -> a !@! b |
6 | |||
4 | value2 = \(a :: _) -> _rhs \(b :: _) -> b !@! a | 7 | value2 = \(a :: _) -> _rhs \(b :: _) -> b !@! a |
5 | main is not found | ||
6 | ------------ trace | 8 | ------------ trace |
7 | (!@!) :: forall a b . a -> b -> () | 9 | (!@!) :: forall a b . a -> b -> () |
8 | value1 :: forall a b . a -> b -> () | 10 | value1 :: forall a b . a -> b -> () |
diff --git a/testdata/let.out b/testdata/let.out index 1789d86f..2f8be352 100644 --- a/testdata/let.out +++ b/testdata/let.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | f = \(a :: _) -> _rhs \(b := _rhs (id a)) -> b | 3 | f = \(a :: _) -> _rhs \(b := _rhs (id a)) -> b |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | f :: forall a . a -> a | 5 | f :: forall a . a -> a |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/letIndent.out b/testdata/letIndent.out index c6cf7e43..187a6088 100644 --- a/testdata/letIndent.out +++ b/testdata/letIndent.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | fun = \(a :: _) -> _rhs \(b := _rhs (fromInt 1)) (c := _rhs (fromInt 2)) -> a | 3 | fun = \(a :: _) -> _rhs \(b := _rhs (fromInt 1)) (c := _rhs (fromInt 2)) -> a |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | fun :: forall a . a -> a | 5 | fun :: forall a . a -> a |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/performance/Material.out b/testdata/performance/Material.out index a9cebf12..ef9a0f94 100644 --- a/testdata/performance/Material.out +++ b/testdata/performance/Material.out | |||
@@ -1,16 +1,23 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | identityLight :: Float | 3 | identityLight :: Float |
3 | identityLight = _rhs (fromInt 1) | 4 | identityLight = _rhs (fromInt 1) |
5 | |||
4 | data Entity :: Type where | 6 | data Entity :: Type where |
5 | Entity | 7 | Entity |
6 | :: Vec (fromInt 4) Float | 8 | :: Vec (fromInt 4) Float |
7 | -> Vec (fromInt 4) Float | 9 | -> Vec (fromInt 4) Float |
8 | -> Vec (fromInt 3) Float -> Vec (fromInt 4) Float -> Entity | 10 | -> Vec (fromInt 3) Float -> Vec (fromInt 4) Float -> Entity |
11 | |||
9 | eAmbientLight = \(a :: _) -> case'Entity (\_ -> _) (\(b :: _) _ _ _ -> _rhs b) a | 12 | eAmbientLight = \(a :: _) -> case'Entity (\_ -> _) (\(b :: _) _ _ _ -> _rhs b) a |
13 | |||
10 | eDirectedLight | 14 | eDirectedLight |
11 | = \(a :: _) -> case'Entity (\_ -> _) (\_ (b :: _) _ _ -> _rhs b) a | 15 | = \(a :: _) -> case'Entity (\_ -> _) (\_ (b :: _) _ _ -> _rhs b) a |
16 | |||
12 | eLightDir = \(a :: _) -> case'Entity (\_ -> _) (\_ _ (b :: _) _ -> _rhs b) a | 17 | eLightDir = \(a :: _) -> case'Entity (\_ -> _) (\_ _ (b :: _) _ -> _rhs b) a |
18 | |||
13 | eShaderRGBA = \(a :: _) -> case'Entity (\_ -> _) (\_ _ _ (b :: _) -> _rhs b) a | 19 | eShaderRGBA = \(a :: _) -> case'Entity (\_ -> _) (\_ _ _ (b :: _) -> _rhs b) a |
20 | |||
14 | data WaveType :: Type where | 21 | data WaveType :: Type where |
15 | WT_Sin :: WaveType | 22 | WT_Sin :: WaveType |
16 | WT_Triangle :: WaveType | 23 | WT_Triangle :: WaveType |
@@ -18,8 +25,10 @@ data WaveType :: Type where | |||
18 | WT_Sawtooth :: WaveType | 25 | WT_Sawtooth :: WaveType |
19 | WT_InverseSawtooth :: WaveType | 26 | WT_InverseSawtooth :: WaveType |
20 | WT_Noise :: WaveType | 27 | WT_Noise :: WaveType |
28 | |||
21 | data Wave :: Type where | 29 | data Wave :: Type where |
22 | Wave :: WaveType -> Float -> Float -> Float -> Float -> Wave | 30 | Wave :: WaveType -> Float -> Float -> Float -> Float -> Wave |
31 | |||
23 | data Deform :: Type where | 32 | data Deform :: Type where |
24 | D_AutoSprite :: Deform | 33 | D_AutoSprite :: Deform |
25 | D_AutoSprite2 :: Deform | 34 | D_AutoSprite2 :: Deform |
@@ -36,10 +45,12 @@ data Deform :: Type where | |||
36 | D_Text6 :: Deform | 45 | D_Text6 :: Deform |
37 | D_Text7 :: Deform | 46 | D_Text7 :: Deform |
38 | D_Wave :: Float -> Wave -> Deform | 47 | D_Wave :: Float -> Wave -> Deform |
48 | |||
39 | data CullType :: Type where | 49 | data CullType :: Type where |
40 | CT_FrontSided :: CullType | 50 | CT_FrontSided :: CullType |
41 | CT_BackSided :: CullType | 51 | CT_BackSided :: CullType |
42 | CT_TwoSided :: CullType | 52 | CT_TwoSided :: CullType |
53 | |||
43 | data Blending' :: Type where | 54 | data Blending' :: Type where |
44 | B_DstAlpha :: Blending' | 55 | B_DstAlpha :: Blending' |
45 | B_DstColor :: Blending' | 56 | B_DstColor :: Blending' |
@@ -52,6 +63,7 @@ data Blending' :: Type where | |||
52 | B_SrcAlphaSaturate :: Blending' | 63 | B_SrcAlphaSaturate :: Blending' |
53 | B_SrcColor :: Blending' | 64 | B_SrcColor :: Blending' |
54 | B_Zero :: Blending' | 65 | B_Zero :: Blending' |
66 | |||
55 | data RGBGen :: Type where | 67 | data RGBGen :: Type where |
56 | RGB_Wave :: Wave -> RGBGen | 68 | RGB_Wave :: Wave -> RGBGen |
57 | RGB_Const :: Float -> Float -> Float -> RGBGen | 69 | RGB_Const :: Float -> Float -> Float -> RGBGen |
@@ -64,6 +76,7 @@ data RGBGen :: Type where | |||
64 | RGB_LightingDiffuse :: RGBGen | 76 | RGB_LightingDiffuse :: RGBGen |
65 | RGB_OneMinusVertex :: RGBGen | 77 | RGB_OneMinusVertex :: RGBGen |
66 | RGB_Undefined :: RGBGen | 78 | RGB_Undefined :: RGBGen |
79 | |||
67 | data AlphaGen :: Type where | 80 | data AlphaGen :: Type where |
68 | A_Wave :: Wave -> AlphaGen | 81 | A_Wave :: Wave -> AlphaGen |
69 | A_Const :: Float -> AlphaGen | 82 | A_Const :: Float -> AlphaGen |
@@ -74,12 +87,14 @@ data AlphaGen :: Type where | |||
74 | A_Vertex :: AlphaGen | 87 | A_Vertex :: AlphaGen |
75 | A_LightingSpecular :: AlphaGen | 88 | A_LightingSpecular :: AlphaGen |
76 | A_OneMinusVertex :: AlphaGen | 89 | A_OneMinusVertex :: AlphaGen |
90 | |||
77 | data TCGen :: Type where | 91 | data TCGen :: Type where |
78 | TG_Base :: TCGen | 92 | TG_Base :: TCGen |
79 | TG_Lightmap :: TCGen | 93 | TG_Lightmap :: TCGen |
80 | TG_Environment :: TCGen | 94 | TG_Environment :: TCGen |
81 | TG_Vector :: Vec (fromInt 3) Float -> Vec (fromInt 3) Float -> TCGen | 95 | TG_Vector :: Vec (fromInt 3) Float -> Vec (fromInt 3) Float -> TCGen |
82 | TG_Undefined :: TCGen | 96 | TG_Undefined :: TCGen |
97 | |||
83 | data TCMod :: Type where | 98 | data TCMod :: Type where |
84 | TM_EntityTranslate :: TCMod | 99 | TM_EntityTranslate :: TCMod |
85 | TM_Rotate :: Float -> TCMod | 100 | TM_Rotate :: Float -> TCMod |
@@ -88,19 +103,23 @@ data TCMod :: Type where | |||
88 | TM_Stretch :: Wave -> TCMod | 103 | TM_Stretch :: Wave -> TCMod |
89 | TM_Transform :: Float -> Float -> Float -> Float -> Float -> Float -> TCMod | 104 | TM_Transform :: Float -> Float -> Float -> Float -> Float -> Float -> TCMod |
90 | TM_Turb :: Float -> Float -> Float -> Float -> TCMod | 105 | TM_Turb :: Float -> Float -> Float -> Float -> TCMod |
106 | |||
91 | data StageTexture :: Type where | 107 | data StageTexture :: Type where |
92 | ST_Map :: String -> StageTexture | 108 | ST_Map :: String -> StageTexture |
93 | ST_ClampMap :: String -> StageTexture | 109 | ST_ClampMap :: String -> StageTexture |
94 | ST_AnimMap :: Float -> [String] -> StageTexture | 110 | ST_AnimMap :: Float -> [String] -> StageTexture |
95 | ST_Lightmap :: StageTexture | 111 | ST_Lightmap :: StageTexture |
96 | ST_WhiteImage :: StageTexture | 112 | ST_WhiteImage :: StageTexture |
113 | |||
97 | data AlphaFunction :: Type where | 114 | data AlphaFunction :: Type where |
98 | A_Gt0 :: AlphaFunction | 115 | A_Gt0 :: AlphaFunction |
99 | A_Lt128 :: AlphaFunction | 116 | A_Lt128 :: AlphaFunction |
100 | A_Ge128 :: AlphaFunction | 117 | A_Ge128 :: AlphaFunction |
118 | |||
101 | data DepthFunction :: Type where | 119 | data DepthFunction :: Type where |
102 | D_Equal :: DepthFunction | 120 | D_Equal :: DepthFunction |
103 | D_Lequal :: DepthFunction | 121 | D_Lequal :: DepthFunction |
122 | |||
104 | data StageAttrs :: Type where | 123 | data StageAttrs :: Type where |
105 | StageAttrs | 124 | StageAttrs |
106 | :: Maybe (HList (Blending' : Blending' : '[])) | 125 | :: Maybe (HList (Blending' : Blending' : '[])) |
@@ -110,61 +129,73 @@ data StageAttrs :: Type where | |||
110 | -> [TCMod] | 129 | -> [TCMod] |
111 | -> StageTexture | 130 | -> StageTexture |
112 | -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String -> StageAttrs | 131 | -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String -> StageAttrs |
132 | |||
113 | saBlend | 133 | saBlend |
114 | = \(a :: _) -> case'StageAttrs | 134 | = \(a :: _) -> case'StageAttrs |
115 | (\_ -> _) | 135 | (\_ -> _) |
116 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 136 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
117 | a | 137 | a |
138 | |||
118 | saRGBGen | 139 | saRGBGen |
119 | = \(a :: _) -> case'StageAttrs | 140 | = \(a :: _) -> case'StageAttrs |
120 | (\_ -> _) | 141 | (\_ -> _) |
121 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) | 142 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) |
122 | a | 143 | a |
144 | |||
123 | saAlphaGen | 145 | saAlphaGen |
124 | = \(a :: _) -> case'StageAttrs | 146 | = \(a :: _) -> case'StageAttrs |
125 | (\_ -> _) | 147 | (\_ -> _) |
126 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) | 148 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) |
127 | a | 149 | a |
150 | |||
128 | saTCGen | 151 | saTCGen |
129 | = \(a :: _) -> case'StageAttrs | 152 | = \(a :: _) -> case'StageAttrs |
130 | (\_ -> _) | 153 | (\_ -> _) |
131 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) | 154 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) |
132 | a | 155 | a |
156 | |||
133 | saTCMod | 157 | saTCMod |
134 | = \(a :: _) -> case'StageAttrs | 158 | = \(a :: _) -> case'StageAttrs |
135 | (\_ -> _) | 159 | (\_ -> _) |
136 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) | 160 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) |
137 | a | 161 | a |
162 | |||
138 | saTexture | 163 | saTexture |
139 | = \(a :: _) -> case'StageAttrs | 164 | = \(a :: _) -> case'StageAttrs |
140 | (\_ -> _) | 165 | (\_ -> _) |
141 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) | 166 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) |
142 | a | 167 | a |
168 | |||
143 | saDepthWrite | 169 | saDepthWrite |
144 | = \(a :: _) -> case'StageAttrs | 170 | = \(a :: _) -> case'StageAttrs |
145 | (\_ -> _) | 171 | (\_ -> _) |
146 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) | 172 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) |
147 | a | 173 | a |
174 | |||
148 | saDepthFunc | 175 | saDepthFunc |
149 | = \(a :: _) -> case'StageAttrs | 176 | = \(a :: _) -> case'StageAttrs |
150 | (\_ -> _) | 177 | (\_ -> _) |
151 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) | 178 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) |
152 | a | 179 | a |
180 | |||
153 | saAlphaFunc | 181 | saAlphaFunc |
154 | = \(a :: _) -> case'StageAttrs | 182 | = \(a :: _) -> case'StageAttrs |
155 | (\_ -> _) | 183 | (\_ -> _) |
156 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) | 184 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) |
157 | a | 185 | a |
186 | |||
158 | saDepthMaskExplicit | 187 | saDepthMaskExplicit |
159 | = \(a :: _) -> case'StageAttrs | 188 | = \(a :: _) -> case'StageAttrs |
160 | (\_ -> _) | 189 | (\_ -> _) |
161 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) | 190 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) |
162 | a | 191 | a |
192 | |||
163 | saTextureUniform | 193 | saTextureUniform |
164 | = \(a :: _) -> case'StageAttrs | 194 | = \(a :: _) -> case'StageAttrs |
165 | (\_ -> _) | 195 | (\_ -> _) |
166 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) | 196 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) |
167 | a | 197 | a |
198 | |||
168 | defaultStageAttrs :: StageAttrs | 199 | defaultStageAttrs :: StageAttrs |
169 | defaultStageAttrs | 200 | defaultStageAttrs |
170 | = _rhs | 201 | = _rhs |
@@ -180,6 +211,7 @@ defaultStageAttrs | |||
180 | Nothing | 211 | Nothing |
181 | False | 212 | False |
182 | "") | 213 | "") |
214 | |||
183 | data CommonAttrs :: Type where | 215 | data CommonAttrs :: Type where |
184 | CommonAttrs | 216 | CommonAttrs |
185 | :: HList '[] | 217 | :: HList '[] |
@@ -189,66 +221,79 @@ data CommonAttrs :: Type where | |||
189 | -> Bool | 221 | -> Bool |
190 | -> Bool | 222 | -> Bool |
191 | -> CullType -> [Deform] -> Bool -> Bool -> [StageAttrs] -> Bool -> CommonAttrs | 223 | -> CullType -> [Deform] -> Bool -> Bool -> [StageAttrs] -> Bool -> CommonAttrs |
224 | |||
192 | caSkyParms | 225 | caSkyParms |
193 | = \(a :: _) -> case'CommonAttrs | 226 | = \(a :: _) -> case'CommonAttrs |
194 | (\_ -> _) | 227 | (\_ -> _) |
195 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 228 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
196 | a | 229 | a |
230 | |||
197 | caFogParms | 231 | caFogParms |
198 | = \(a :: _) -> case'CommonAttrs | 232 | = \(a :: _) -> case'CommonAttrs |
199 | (\_ -> _) | 233 | (\_ -> _) |
200 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 234 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
201 | a | 235 | a |
236 | |||
202 | caPortal | 237 | caPortal |
203 | = \(a :: _) -> case'CommonAttrs | 238 | = \(a :: _) -> case'CommonAttrs |
204 | (\_ -> _) | 239 | (\_ -> _) |
205 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) | 240 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) |
206 | a | 241 | a |
242 | |||
207 | caSort | 243 | caSort |
208 | = \(a :: _) -> case'CommonAttrs | 244 | = \(a :: _) -> case'CommonAttrs |
209 | (\_ -> _) | 245 | (\_ -> _) |
210 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) | 246 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) |
211 | a | 247 | a |
248 | |||
212 | caEntityMergable | 249 | caEntityMergable |
213 | = \(a :: _) -> case'CommonAttrs | 250 | = \(a :: _) -> case'CommonAttrs |
214 | (\_ -> _) | 251 | (\_ -> _) |
215 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) | 252 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) |
216 | a | 253 | a |
254 | |||
217 | caFogOnly | 255 | caFogOnly |
218 | = \(a :: _) -> case'CommonAttrs | 256 | = \(a :: _) -> case'CommonAttrs |
219 | (\_ -> _) | 257 | (\_ -> _) |
220 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) | 258 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) |
221 | a | 259 | a |
260 | |||
222 | caCull | 261 | caCull |
223 | = \(a :: _) -> case'CommonAttrs | 262 | = \(a :: _) -> case'CommonAttrs |
224 | (\_ -> _) | 263 | (\_ -> _) |
225 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) | 264 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) |
226 | a | 265 | a |
266 | |||
227 | caDeformVertexes | 267 | caDeformVertexes |
228 | = \(a :: _) -> case'CommonAttrs | 268 | = \(a :: _) -> case'CommonAttrs |
229 | (\_ -> _) | 269 | (\_ -> _) |
230 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) | 270 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) |
231 | a | 271 | a |
272 | |||
232 | caNoMipMaps | 273 | caNoMipMaps |
233 | = \(a :: _) -> case'CommonAttrs | 274 | = \(a :: _) -> case'CommonAttrs |
234 | (\_ -> _) | 275 | (\_ -> _) |
235 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) | 276 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) |
236 | a | 277 | a |
278 | |||
237 | caPolygonOffset | 279 | caPolygonOffset |
238 | = \(a :: _) -> case'CommonAttrs | 280 | = \(a :: _) -> case'CommonAttrs |
239 | (\_ -> _) | 281 | (\_ -> _) |
240 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) | 282 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) |
241 | a | 283 | a |
284 | |||
242 | caStages | 285 | caStages |
243 | = \(a :: _) -> case'CommonAttrs | 286 | = \(a :: _) -> case'CommonAttrs |
244 | (\_ -> _) | 287 | (\_ -> _) |
245 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) | 288 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) |
246 | a | 289 | a |
290 | |||
247 | caIsSky | 291 | caIsSky |
248 | = \(a :: _) -> case'CommonAttrs | 292 | = \(a :: _) -> case'CommonAttrs |
249 | (\_ -> _) | 293 | (\_ -> _) |
250 | (\_ _ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) | 294 | (\_ _ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) |
251 | a | 295 | a |
296 | |||
252 | defaultCommonAttrs :: CommonAttrs | 297 | defaultCommonAttrs :: CommonAttrs |
253 | defaultCommonAttrs | 298 | defaultCommonAttrs |
254 | = _rhs | 299 | = _rhs |
@@ -265,7 +310,6 @@ defaultCommonAttrs | |||
265 | False | 310 | False |
266 | [] | 311 | [] |
267 | False) | 312 | False) |
268 | main is not found | ||
269 | ------------ trace | 313 | ------------ trace |
270 | identityLight :: Float | 314 | identityLight :: Float |
271 | 'Entity :: Type | 315 | 'Entity :: Type |
diff --git a/testdata/performance/SampleMaterial.out b/testdata/performance/SampleMaterial.out index 95b4da4a..d48fe86c 100644 --- a/testdata/performance/SampleMaterial.out +++ b/testdata/performance/SampleMaterial.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | sampleMaterial | 3 | sampleMaterial |
3 | = _rhs | 4 | = _rhs |
@@ -2076,7 +2077,6 @@ sampleMaterial | |||
2076 | False) | 2077 | False) |
2077 | HNil) | 2078 | HNil) |
2078 | : []) | 2079 | : []) |
2079 | main is not found | ||
2080 | ------------ trace | 2080 | ------------ trace |
2081 | sampleMaterial :: [(String, CommonAttrs)] | 2081 | sampleMaterial :: [(String, CommonAttrs)] |
2082 | ------------ tooltips | 2082 | ------------ tooltips |
diff --git a/testdata/qualified.out b/testdata/qualified.out index 907bca84..521dcdfe 100644 --- a/testdata/qualified.out +++ b/testdata/qualified.out | |||
@@ -1,2 +1,2 @@ | |||
1 | ------------ desugared source code | ||
2 | main is not found | 1 | main is not found |
2 | ------------ desugared source code \ No newline at end of file | ||
diff --git a/testdata/traceTest.out b/testdata/traceTest.out index d796730f..75428209 100644 --- a/testdata/traceTest.out +++ b/testdata/traceTest.out | |||
@@ -1,10 +1,12 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | id = \(a :: _) -> _rhs a | 3 | id = \(a :: _) -> _rhs a |
4 | |||
3 | data X (_ :: Type) (_ :: _a) :: Type where | 5 | data X (_ :: Type) (_ :: _a) :: Type where |
4 | 6 | ||
7 | |||
5 | x :: X \(a :: _) (b :: _) -> HList (a : b : '[]) | 8 | x :: X \(a :: _) (b :: _) -> HList (a : b : '[]) |
6 | x = _rhs undefined | 9 | x = _rhs undefined |
7 | main is not found | ||
8 | ------------ trace | 10 | ------------ trace |
9 | id :: forall a . a -> a | 11 | id :: forall a . a -> a |
10 | 'X :: forall a . a -> Type | 12 | 'X :: forall a . a -> Type |
diff --git a/testdata/typeclass.out b/testdata/typeclass.out index b74a7e31..aecc4686 100644 --- a/testdata/typeclass.out +++ b/testdata/typeclass.out | |||
@@ -1,12 +1,21 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | infix 4 == | 3 | infix 4 == |
4 | |||
3 | infix 4 /= | 5 | infix 4 /= |
6 | |||
4 | infix 4 < | 7 | infix 4 < |
8 | |||
5 | infixr 3 && | 9 | infixr 3 && |
10 | |||
6 | infixr 2 || | 11 | infixr 2 || |
12 | |||
7 | not = \(a :: _) -> case'Bool (\_ -> _) (_rhs True) (_rhs False) a | 13 | not = \(a :: _) -> case'Bool (\_ -> _) (_rhs True) (_rhs False) a |
14 | |||
8 | (&&) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs False) (_rhs b) a | 15 | (&&) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs False) (_rhs b) a |
16 | |||
9 | (||) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs b) (_rhs True) a | 17 | (||) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs b) (_rhs True) a |
18 | |||
10 | 'Eq :: Type -> Type | 19 | 'Eq :: Type -> Type |
11 | 'Eq | 20 | 'Eq |
12 | = \(a :: _) -> match'Bool | 21 | = \(a :: _) -> match'Bool |
@@ -14,6 +23,7 @@ not = \(a :: _) -> case'Bool (\_ -> _) (_rhs True) (_rhs False) a | |||
14 | (_rhs 'Unit) | 23 | (_rhs 'Unit) |
15 | a | 24 | a |
16 | (_rhs ('Empty "no instance of 'Eq on ???")) | 25 | (_rhs ('Empty "no instance of 'Eq on ???")) |
26 | |||
17 | (==) :: forall a . Eq a => a -> a -> Bool | 27 | (==) :: forall a . Eq a => a -> a -> Bool |
18 | (==) | 28 | (==) |
19 | = \ @a @_ -> match'Bool | 29 | = \ @a @_ -> match'Bool |
@@ -23,8 +33,8 @@ not = \(a :: _) -> case'Bool (\_ -> _) (_rhs True) (_rhs False) a | |||
23 | := \(c :: _) (d :: _) -> case'Bool (\_ -> _) (_rhs (not d)) (_rhs d) c) -> b) | 33 | := \(c :: _) (d :: _) -> case'Bool (\_ -> _) (_rhs (not d)) (_rhs d) c) -> b) |
24 | a | 34 | a |
25 | (_rhs undefined) | 35 | (_rhs undefined) |
36 | |||
26 | (/=) = \(a :: _) (b :: _) -> _rhs (not (a == b)) | 37 | (/=) = \(a :: _) (b :: _) -> _rhs (not (a == b)) |
27 | main is not found | ||
28 | ------------ trace | 38 | ------------ trace |
29 | not :: Bool -> Bool | 39 | not :: Bool -> Bool |
30 | (&&) :: Bool -> Bool -> Bool | 40 | (&&) :: Bool -> Bool -> Bool |
diff --git a/testdata/where.out b/testdata/where.out index 89ee58f1..6ba06bfc 100644 --- a/testdata/where.out +++ b/testdata/where.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | f = _rhs \(a := _rhs \(c := _rhs 1.0) -> c) (b := _rhs 1.0) -> b | 3 | f = _rhs \(a := _rhs \(c := _rhs 1.0) -> c) (b := _rhs 1.0) -> b |
3 | main is not found | ||
4 | ------------ trace | 4 | ------------ trace |
5 | f :: Float | 5 | f :: Float |
6 | ------------ tooltips | 6 | ------------ tooltips |
diff --git a/testdata/zip01.out b/testdata/zip01.out index 582866bb..650f67b5 100644 --- a/testdata/zip01.out +++ b/testdata/zip01.out | |||
@@ -1,3 +1,4 @@ | |||
1 | main is not found | ||
1 | ------------ desugared source code | 2 | ------------ desugared source code |
2 | zip2 :: forall (a :: _) (b :: _) . [a] -> [b] -> [HList (a : b : '[])] | 3 | zip2 :: forall (a :: _) (b :: _) . [a] -> [b] -> [HList (a : b : '[])] |
3 | zip2 | 4 | zip2 |
@@ -10,7 +11,6 @@ zip2 | |||
10 | (\(e :: _) (f :: _) -> _rhs (HCons c (HCons e HNil) : zip2 d f)) | 11 | (\(e :: _) (f :: _) -> _rhs (HCons c (HCons e HNil) : zip2 d f)) |
11 | b) | 12 | b) |
12 | a | 13 | a |
13 | main is not found | ||
14 | ------------ trace | 14 | ------------ trace |
15 | zip2 :: forall a b . [a] -> [b] -> [(a, b)] | 15 | zip2 :: forall a b . [a] -> [b] -> [(a, b)] |
16 | ------------ tooltips | 16 | ------------ tooltips |