summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/LambdaCube/Compiler/Parser.hs119
-rw-r--r--testdata/Builtins.out110
-rw-r--r--testdata/Internals.out86
-rw-r--r--testdata/Material.out6
-rw-r--r--testdata/Prelude.out36
-rw-r--r--testdata/complex.out40
-rw-r--r--testdata/data.out6
-rw-r--r--testdata/performance/Material.out6
-rw-r--r--testdata/typeclass.out12
9 files changed, 107 insertions, 314 deletions
diff --git a/src/LambdaCube/Compiler/Parser.hs b/src/LambdaCube/Compiler/Parser.hs
index 917af44b..ef410eaf 100644
--- a/src/LambdaCube/Compiler/Parser.hs
+++ b/src/LambdaCube/Compiler/Parser.hs
@@ -272,6 +272,12 @@ rUp n l = rearrange l $ \k -> if k >= 0 then k + n else k
272instance Rearrange a => Rearrange [a] where 272instance Rearrange a => Rearrange [a] where
273 rearrange l f = map $ rearrange l f 273 rearrange l f = map $ rearrange l f
274 274
275instance (Rearrange a, Rearrange b) => Rearrange (Either a b) where
276 rearrange l f = rearrange l f +++ rearrange l f
277
278instance (Rearrange a, Rearrange b) => Rearrange (a, b) where
279 rearrange l f = rearrange l f *** rearrange l f
280
275instance Rearrange SExp where 281instance Rearrange SExp where
276 rearrange i f = mapS (\_ -> elimVoid) (const . SGlobal) (\sn j i -> SVar sn $ if j < i then j else i + f (j - i)) i 282 rearrange i f = mapS (\_ -> elimVoid) (const . SGlobal) (\sn j i -> SVar sn $ if j < i then j else i + f (j - i)) i
277 283
@@ -498,7 +504,7 @@ parseTerm_ ge = \case
498 exp <- parseTerm PrecLam 504 exp <- parseTerm PrecLam
499 return $ \e -> 505 return $ \e ->
500 SBuiltin "concatMap" 506 SBuiltin "concatMap"
501 `SAppV` SLamV (compileGuardTree id id ge $ compilePatts [(pat, 0)] (Right $ deBruijnify dbs e) `mappend` In (GuardLeaf BNil)) 507 `SAppV` SLamV (compileGuardTree id id ge $ compilePatts [pat] (Right $ deBruijnify dbs e) `mappend` In (GuardLeaf BNil))
502 `SAppV` exp 508 `SAppV` exp
503 509
504 letdecl = mkLets ge <$ reserved "let" <*> (compileFunAlts' =<< valueDef) 510 letdecl = mkLets ge <$ reserved "let" <*> (compileFunAlts' =<< valueDef)
@@ -528,7 +534,7 @@ getList (BCons x (getList -> Just y)) = Just (x:y)
528getList _ = Nothing 534getList _ = Nothing
529 535
530patLam :: (SExp -> SExp) -> DesugarInfo -> (Visibility, SExp) -> Pat -> SExp -> SExp 536patLam :: (SExp -> SExp) -> DesugarInfo -> (Visibility, SExp) -> Pat -> SExp -> SExp
531patLam f ge (v, t) p e = SLam v t $ compileGuardTree f f ge $ compilePatts [(p, 0)] $ Right e 537patLam f ge (v, t) p e = SLam v t $ compileGuardTree f f ge $ compilePatts [p] $ Right e
532 538
533-------------------------------------------------------------------------------- pattern representation 539-------------------------------------------------------------------------------- pattern representation
534 540
@@ -543,7 +549,7 @@ data Pat
543newtype ParPat = ParPat [Pat] 549newtype ParPat = ParPat [Pat]
544 deriving Show 550 deriving Show
545 551
546pattern PWildcard si = PVar (si, "") 552pattern PWildcard = ParPat []
547pattern PCon n pp <- PCon_ _ n pp 553pattern PCon n pp <- PCon_ _ n pp
548 where PCon n pp = PCon_ (fst n <> sourceInfo pp) n pp 554 where PCon n pp = PCon_ (fst n <> sourceInfo pp) n pp
549pattern ViewPat e pp <- ViewPat_ _ e pp 555pattern ViewPat e pp <- ViewPat_ _ e pp
@@ -620,7 +626,7 @@ instance SetSourceInfo Pat where
620 626
621parsePat p = appRange $ flip setSI <$> parsePat_ p 627parsePat p = appRange $ flip setSI <$> parsePat_ p
622 628
623parsePat_ :: Prec -> BodyParser Pat 629parsePat_ :: Prec -> BodyParser Pat -- TODO: ParPat
624parsePat_ = \case 630parsePat_ = \case
625 PrecAnn -> 631 PrecAnn ->
626 patType <$> parsePat PrecOp <*> parseType (Just $ Wildcard SType) 632 patType <$> parsePat PrecOp <*> parseType (Just $ Wildcard SType)
@@ -637,7 +643,7 @@ parsePat_ = \case
637 PrecAtom -> 643 PrecAtom ->
638 mkLit <$> asks namespace <*> try "literal" parseLit 644 mkLit <$> asks namespace <*> try "literal" parseLit
639 <|> flip PCon [] <$> upperCase_ 645 <|> flip PCon [] <$> upperCase_
640 <|> PVar <$> patVar 646 <|> PVar <$> patVar -- TODO: PWildcard
641 <|> char '\'' *> ppa switchNamespace 647 <|> char '\'' *> ppa switchNamespace
642 <|> ppa id 648 <|> ppa id
643 where 649 where
@@ -657,7 +663,6 @@ parsePat_ = \case
657 mkListPat ns ps = foldr (\p ps -> PBuiltin "Cons" [p, ps]) (PBuiltin "Nil" []) ps 663 mkListPat ns ps = foldr (\p ps -> PBuiltin "Cons" [p, ps]) (PBuiltin "Nil" []) ps
658 664
659 --mkTupPat :: [Pat] -> Pat 665 --mkTupPat :: [Pat] -> Pat
660 -- TODO: tup type pattern in type namespace
661 mkTupPat TypeNS [PParens x] = mkTTup [x] 666 mkTupPat TypeNS [PParens x] = mkTTup [x]
662 mkTupPat ns [PParens x] = mkTup [x] 667 mkTupPat ns [PParens x] = mkTup [x]
663 mkTupPat _ [x] = PParens x 668 mkTupPat _ [x] = PParens x
@@ -713,10 +718,9 @@ instance Rearrange a => Rearrange (Lets a) where
713 718
714-- TODO: support type signature? 719-- TODO: support type signature?
715data GuardTree 720data GuardTree
716 = GuardNode SExp SName{-TODO:SIName-} [ParPat] GuardTrees GuardTrees 721 = GuardNode SExp SName{-TODO:SIName-} [SIName] GuardTrees GuardTrees
717 | GuardLeaf SExp 722 | GuardLeaf SExp
718 | GTError 723 | GTError
719-- | GuardLet SExp GuardTree
720 deriving Show 724 deriving Show
721 725
722type GuardTrees = Lets GuardTree 726type GuardTrees = Lets GuardTree
@@ -730,8 +734,7 @@ instance Monoid GuardTrees where
730 734
731mapGT :: (Int -> ParPat -> ParPat) -> (Int -> SExp -> SExp) -> Int -> GuardTree -> GuardTree 735mapGT :: (Int -> ParPat -> ParPat) -> (Int -> SExp -> SExp) -> Int -> GuardTree -> GuardTree
732mapGT f h k = \case 736mapGT f h k = \case
733 GuardNode e c pps gt el -> GuardNode (h k e) c (upPats f k pps) (mapGTs f h (k + patVars pps) gt) (mapGTs f h k el) 737 GuardNode e c pps gt el -> GuardNode (h k e) c pps (mapGTs f h (k + length pps) gt) (mapGTs f h k el)
734-- GuardLet e gt -> GuardLet (h k e) $ mapGT f h (k + 1) gt
735 GuardLeaf e -> GuardLeaf $ h k e 738 GuardLeaf e -> GuardLeaf $ h k e
736 GTError -> GTError 739 GTError -> GTError
737 740
@@ -740,38 +743,32 @@ mapGTs f h = mapLets h (mapGT f h)
740instance Rearrange GuardTree where 743instance Rearrange GuardTree where
741 rearrange l f = mapGT (`rearrange` f) (`rearrange` f) l 744 rearrange l f = mapGT (`rearrange` f) (`rearrange` f) l
742 745
743-- todo: clenup 746guardNode :: Pat -> SExp -> GuardTrees -> GuardTrees
744compilePatts :: [(Pat, Int)] -> Either [(SExp, SExp)] SExp -> GuardTrees 747guardNode (PVar sn) e gt = lLet e gt
745compilePatts ps gu = cp [] ps 748guardNode (PParens p) e gt = guardNode p e gt
749guardNode (ViewPat f p) e gt = guardNode' p (f `SAppV` e) gt
750guardNode (PCon sn ps) e gt = In $ GuardNode e (snd sn) ((\(v, _, _) -> v) <$> ws) gt' mempty
746 where 751 where
747 cp ps' [] = rearrange 0 (f $ reverse ps') $ case gu of 752 n = length ps
748 Right e -> In $ GuardLeaf e 753 ws = [(ns, SVar ns (n-1-i+d), rUp n d p) | (i, p, d) <- zip3 [0..] ps $ sums $ map patVars ps, let ns = dummyName $ "gn" ++ show i]
749 Left gs -> mconcat [In $ GuardNode ge "True" [] (In $ GuardLeaf e) mempty | (ge, e) <- gs] 754 gt' = foldr f (rUp n (patVars ps) gt) ws
750 cp ps' ((p@PVar{}, i): xs) = cp (p: ps') xs 755 f (v, e, p) gt = guardNode' p e gt
751 cp ps' ((p@(PCon (si, n) ps), i): xs) = In $ GuardNode (SVar (si, n) $ i + sum (map (fromMaybe 0 . ff) ps')) n ps (cp (p: ps') xs) mempty 756
752 cp ps' ((PParens p, i): xs) = cp ps' ((p, i): xs) 757guardNode' (ParPat ps) e gt = case ps of
753 cp ps' ((p@(ViewPatSimp f (PCon (si, n) ps)), i): xs) 758 [] -> gt
754 = In $ GuardNode (SAppV f $ SVar (si, n) $ i + sum (map (fromMaybe 0 . ff) ps')) n ps (cp (p: ps') xs) mempty 759 [p] -> guardNode p e gt
755 cp _ p = error $ "cp: " ++ show p 760 -- TODO: ps
756 761
757 m = length ps 762sums = scanl (+) 0
758
759 ff PVar{} = Nothing
760 ff p = Just $ patVars p
761
762 f ps i
763 | i >= s = i - s + m + sum vs'
764 | i < s = case vs_ !! n of
765 Nothing -> m + sum vs' - 1 - n
766 Just _ -> m + sum vs' - 1 - (m + sum (take n vs') + j)
767 where
768 i' = s - 1 - i
769 (n, j) = concat (zipWith (\k j -> zip (repeat j) [0..k-1]) vs [0..]) !! i'
770 763
771 vs_ = map ff ps 764compilePatts :: [Pat] -> Either [(SExp, SExp)] SExp -> GuardTrees
772 vs = map (fromMaybe 1) vs_ 765compilePatts ps gu = foldr f gu' $ zip3 ps [0..] $ sums $ map patVars ps
773 vs' = map (fromMaybe 0) vs_ 766 where
774 s = sum vs 767 n = length ps
768 f (p, i, d) g = guardNode (rUp n d p) (sVar "xcp" $ n-1-i + d) g
769 gu' = case rUp n (patVars ps) gu of
770 Right e -> In $ GuardLeaf e
771 Left gs -> mconcat [guardNode (PBuiltin "True" []) ge (In $ GuardLeaf e) | (ge, e) <- gs]
775 772
776compileGuardTree :: (SExp -> SExp) -> (SExp -> SExp) -> DesugarInfo -> GuardTrees -> SExp 773compileGuardTree :: (SExp -> SExp) -> (SExp -> SExp) -> DesugarInfo -> GuardTrees -> SExp
777compileGuardTree ulend lend adts = guardTreeToCases 774compileGuardTree ulend lend adts = guardTreeToCases
@@ -794,46 +791,27 @@ compileGuardTree ulend lend adts = guardTreeToCases
794 791
795 filterGuardTree' :: SExp -> SName{-constr.-} -> GuardTrees -> GuardTrees 792 filterGuardTree' :: SExp -> SName{-constr.-} -> GuardTrees -> GuardTrees
796 filterGuardTree' f s = \case 793 filterGuardTree' f s = \case
797 In (GuardNode f' s' ps gs el) 794 In (GuardNode f' s' ps gs (filterGuardTree' f s -> el))
798 | f /= f' || s /= s' -> In $ GuardNode f' s' ps (filterGuardTree' (up su f) s gs) (filterGuardTree' f s el) 795 | f /= f' || s /= s' -> In $ GuardNode f' s' ps (filterGuardTree' (up (length ps) f) s gs) el
799 | otherwise -> filterGuardTree' f s el 796 | otherwise -> el
800 where
801 su = patVars ps
802 In x -> In x 797 In x -> In x
803 798
804 filterGuardTree :: SExp -> SName{-constr.-} -> Int -> Int{-number of constr. params-} -> GuardTrees -> GuardTrees 799 filterGuardTree :: SExp -> SName{-constr.-} -> Int -> Int{-number of constr. params-} -> GuardTrees -> GuardTrees
805 filterGuardTree f s k ns = \case 800 filterGuardTree f s k ns = \case
806 In (GuardNode f' s' ps gs el) 801 In (GuardNode f' s' ps gs (filterGuardTree f s k ns -> el))
807 | f /= f' -> In $ GuardNode f' s' ps (filterGuardTree (up su f) s (su + k) ns gs) el' 802 | f /= f' -> In $ GuardNode f' s' ps (filterGuardTree (up su f) s (su + k) ns gs) el
808 | s == s' -> filterGuardTree f s k ns $ guardNodes (zips [k+ns-1, k+ns-2..] ps) gs <> el' 803 | s == s' -> filterGuardTree f s k ns $ foldr lLet gs (replicate su $ sVar "30" $ k+ns-1) <> el
809 | otherwise -> el' 804 | otherwise -> el
810 where 805 where
811 el' = filterGuardTree f s k ns el 806 su = length ps
812 zips is ps = zip (map (sVar "30") $ zipWith (+) is $ sums $ map patVars ps) ps
813 su = patVars ps
814 sums = scanl (+) 0
815 In x -> In x 807 In x -> In x
816 808
817 guardNodes :: [(SExp, ParPat)] -> GuardTrees -> GuardTrees
818 guardNodes [] l = l
819 guardNodes ((v, ParPat ws): vs) e = guardNode' v ws $ guardNodes vs e
820
821 guardNode' :: SExp -> [Pat] -> GuardTrees -> GuardTrees
822 guardNode' v [] e = e
823 guardNode' v [w] e = case w of
824 PVar _ -> {-todo guardNode v (subst x v ws) $ -} varGuardNode 0 v e
825 PParens p -> guardNode' v [p] e
826 ViewPat f (ParPat p) -> guardNode' (f `SAppV` v) p {- -$ guardNode v ws -} e
827 PCon (_, s) ps' -> In $ GuardNode v s ps' {- -$ guardNode v ws -} e mempty
828
829 varGuardNode v (SVar _ e) = rSubst v e
830
831compileGuardTrees ulend adts = compileGuardTree ulend SRHS adts . mconcat 809compileGuardTrees ulend adts = compileGuardTree ulend SRHS adts . mconcat
832 810
833compileGuardTrees' ge = foldr1 (SAppV2 $ SBuiltin "parEval" `SAppV` Wildcard SType) . map (compileGuardTrees id ge . (:[])) 811compileGuardTrees' ge = foldr1 (SAppV2 $ SBuiltin "parEval" `SAppV` Wildcard SType) . map (compileGuardTrees id ge . (:[]))
834 812
835compileCase ge x cs 813compileCase ge x cs
836 = SLamV (compileGuardTree id id ge $ mconcat [compilePatts [(p, 0)] e | (p, e) <- cs]) `SAppV` x 814 = SLamV (compileGuardTree id id ge $ mconcat [compilePatts [p] e | (p, e) <- cs]) `SAppV` x
837 815
838 816
839-------------------------------------------------------------------------------- declaration representation 817-------------------------------------------------------------------------------- declaration representation
@@ -1125,10 +1103,7 @@ compileFunAlts (compilegt :: DesugarInfo -> [GuardTrees] -> SExp) ds xs = dsInfo
1125 | otherwise -> return 1103 | otherwise -> return
1126 [ Let n 1104 [ Let n
1127 (listToMaybe [t | TypeAnn n' t <- ds, n' == n]) 1105 (listToMaybe [t | TypeAnn n' t <- ds, n' == n])
1128 $ foldr (uncurry SLam . fst) (compilegt ge 1106 $ foldr (uncurry SLam . fst) (compilegt ge [compilePatts (map snd vs) gsx | FunAlt _ vs gsx <- fs]) vs
1129 [ compilePatts (zip (map snd vs) $ reverse [0.. num - 1]) gsx
1130 | FunAlt _ vs gsx <- fs
1131 ]) vs
1132 ] 1107 ]
1133 _ -> fail $ "different number of arguments of " ++ snd n ++ " at " ++ ppShow (fst n) 1108 _ -> fail $ "different number of arguments of " ++ snd n ++ " at " ++ ppShow (fst n)
1134 x -> return x 1109 x -> return x
diff --git a/testdata/Builtins.out b/testdata/Builtins.out
index 8898f2fc..5826eb89 100644
--- a/testdata/Builtins.out
+++ b/testdata/Builtins.out
@@ -453,13 +453,11 @@ testdata/Builtins.lc 19:35-19:43 Type
453testdata/Builtins.lc 19:40-19:41 Type 453testdata/Builtins.lc 19:40-19:41 Type
454testdata/Builtins.lc 19:42-19:43 Nat 454testdata/Builtins.lc 19:42-19:43 Nat
455testdata/Builtins.lc 20:1-20:7 {a} -> {b} -> {c:Nat} -> a->b -> VecS a c -> VecS b c 455testdata/Builtins.lc 20:1-20:7 {a} -> {b} -> {c:Nat} -> a->b -> VecS a c -> VecS b c
456testdata/Builtins.lc 20:11-20:13 VecS V5 V3
457testdata/Builtins.lc 20:11-22:51 V2->V2 -> VecS V3 V1 -> VecS V3 V2 | VecS V3 V1 -> VecS V3 V2 | VecS V3 V2
458testdata/Builtins.lc 20:21-20:23 {a} -> a -> a -> VecS a 2 456testdata/Builtins.lc 20:21-20:23 {a} -> a -> a -> VecS a 2
459testdata/Builtins.lc 20:21-20:29 V5 -> VecS V6 2 457testdata/Builtins.lc 20:21-20:29 V5 -> VecS V6 2
460testdata/Builtins.lc 20:21-20:35 V0 -> V1 -> VecS V6 2 | V1 -> VecS V6 2 | VecS V5 2 458testdata/Builtins.lc 20:21-20:35 V0 -> V1 -> VecS V6 2 | V1 -> VecS V6 2 | VecS V5 2
461testdata/Builtins.lc 20:21-21:43 (V4 -> V5 -> V6 -> V7 -> VecS V7 4) -> {f:Nat} -> VecS V6 f -> VecS V6 f 459testdata/Builtins.lc 20:21-21:43 (V4 -> V5 -> V6 -> V7 -> VecS V7 4) -> {f:Nat} -> VecS V6 f -> VecS V6 f
462testdata/Builtins.lc 20:21-22:51 {a:Nat} -> VecS V5 a -> VecS V5 a 460testdata/Builtins.lc 20:21-22:51 V2->V2 -> VecS V3 V1 -> VecS V3 V2 | VecS V3 V1 -> VecS V3 V2 | {a:Nat} -> VecS V5 a -> VecS V5 a
463testdata/Builtins.lc 20:25-20:26 V8->V8 461testdata/Builtins.lc 20:25-20:26 V8->V8
464testdata/Builtins.lc 20:25-20:28 V5 462testdata/Builtins.lc 20:25-20:28 V5
465testdata/Builtins.lc 20:27-20:28 V2 463testdata/Builtins.lc 20:27-20:28 V2
@@ -777,29 +775,16 @@ testdata/Builtins.lc 41:75-41:84 Mat 4 4 Float -> Type
777testdata/Builtins.lc 41:77-41:78 V1 775testdata/Builtins.lc 41:77-41:78 V1
778testdata/Builtins.lc 41:79-41:84 Type 776testdata/Builtins.lc 41:79-41:84 Type
779testdata/Builtins.lc 44:5-44:21 Type->Type 777testdata/Builtins.lc 44:5-44:21 Type->Type
780testdata/Builtins.lc 44:22-44:27 Type
781testdata/Builtins.lc 44:22-44:35 Type->Type
782testdata/Builtins.lc 44:22-48:37 Type | Type->Type
783testdata/Builtins.lc 44:30-44:35 Type 778testdata/Builtins.lc 44:30-44:35 Type
784testdata/Builtins.lc 45:22-45:26 Type 779testdata/Builtins.lc 44:30-48:37 Type | Type->Type
785testdata/Builtins.lc 45:22-45:33 Type->Type
786testdata/Builtins.lc 45:22-48:37 Type
787testdata/Builtins.lc 45:29-45:33 Type 780testdata/Builtins.lc 45:29-45:33 Type
788testdata/Builtins.lc 46:22-46:25 Type 781testdata/Builtins.lc 45:29-48:37 Type
789testdata/Builtins.lc 46:22-46:31 Type->Type
790testdata/Builtins.lc 46:22-48:37 Type
791testdata/Builtins.lc 46:28-46:31 Type 782testdata/Builtins.lc 46:28-46:31 Type
792testdata/Builtins.lc 47:23-47:27 Type 783testdata/Builtins.lc 46:28-48:37 Type
793testdata/Builtins.lc 47:23-47:36 Type->Type
794testdata/Builtins.lc 47:23-48:37 Type
795testdata/Builtins.lc 47:35-47:36 Nat->Type | Type | Type -> Nat->Type 784testdata/Builtins.lc 47:35-47:36 Nat->Type | Type | Type -> Nat->Type
796testdata/Builtins.lc 48:23-48:26 Type 785testdata/Builtins.lc 47:35-48:37 Type
797testdata/Builtins.lc 48:23-48:37 Type->Type
798testdata/Builtins.lc 48:36-48:37 Nat -> Nat -> Type->Type | Nat -> Type->Type | Type | Type->Type 786testdata/Builtins.lc 48:36-48:37 Nat -> Nat -> Type->Type | Nat -> Type->Type | Type | Type->Type
799testdata/Builtins.lc 52:7-52:13 Type->Type 787testdata/Builtins.lc 52:7-52:13 Type->Type
800testdata/Builtins.lc 54:25-54:28 Type
801testdata/Builtins.lc 54:25-55:30 Type | Type->Type
802testdata/Builtins.lc 55:25-55:30 Type
803testdata/Builtins.lc 57:7-57:16 Type->Type 788testdata/Builtins.lc 57:7-57:16 Type->Type
804testdata/Builtins.lc 57:7-58:12 Type 789testdata/Builtins.lc 57:7-58:12 Type
805testdata/Builtins.lc 57:7-59:11 Type 790testdata/Builtins.lc 57:7-59:11 Type
@@ -807,38 +792,22 @@ testdata/Builtins.lc 58:3-58:7 {a} -> {b : Component a}->a
807testdata/Builtins.lc 58:11-58:12 Type 792testdata/Builtins.lc 58:11-58:12 Type
808testdata/Builtins.lc 59:3-59:6 {a} -> {b : Component a}->a 793testdata/Builtins.lc 59:3-59:6 {a} -> {b : Component a}->a
809testdata/Builtins.lc 59:10-59:11 Type 794testdata/Builtins.lc 59:10-59:11 Type
810testdata/Builtins.lc 61:20-61:23 Type
811testdata/Builtins.lc 61:20-62:18 V1->V2
812testdata/Builtins.lc 61:20-63:17 V1->V2
813testdata/Builtins.lc 61:20-79:24 Type | Type->Type
814testdata/Builtins.lc 61:20-89:36 V1 | {a : Component V0}->V1 | {a} -> {b : Component a}->a
815testdata/Builtins.lc 61:20-90:31 V1 | {a : Component V0}->V1 | {a} -> {b : Component a}->a
816testdata/Builtins.lc 62:10-62:11 V1 795testdata/Builtins.lc 62:10-62:11 V1
796testdata/Builtins.lc 62:10-89:36 V1 | {a : Component V0}->V1 | {a} -> {b : Component a}->a
817testdata/Builtins.lc 62:15-62:18 Type 797testdata/Builtins.lc 62:15-62:18 Type
818testdata/Builtins.lc 63:9-63:10 V1 798testdata/Builtins.lc 63:9-63:10 V1
799testdata/Builtins.lc 63:9-90:31 V1 | {a : Component V0}->V1 | {a} -> {b : Component a}->a
819testdata/Builtins.lc 63:14-63:17 Type 800testdata/Builtins.lc 63:14-63:17 Type
820testdata/Builtins.lc 64:20-64:24 Type
821testdata/Builtins.lc 64:20-65:19 V1->V2
822testdata/Builtins.lc 64:20-66:18 V1->V2
823testdata/Builtins.lc 64:20-79:24 Type
824testdata/Builtins.lc 64:20-89:36 V1
825testdata/Builtins.lc 64:20-90:31 V1
826testdata/Builtins.lc 65:10-65:11 V1 801testdata/Builtins.lc 65:10-65:11 V1
802testdata/Builtins.lc 65:10-89:36 V1
827testdata/Builtins.lc 65:15-65:19 Type 803testdata/Builtins.lc 65:15-65:19 Type
828testdata/Builtins.lc 66:9-66:10 V1 804testdata/Builtins.lc 66:9-66:10 V1
805testdata/Builtins.lc 66:9-90:31 V1
829testdata/Builtins.lc 66:14-66:18 Type 806testdata/Builtins.lc 66:14-66:18 Type
830testdata/Builtins.lc 67:20-67:25 Type
831testdata/Builtins.lc 67:20-68:13 V1->V2
832testdata/Builtins.lc 67:20-69:12 V1->V2
833testdata/Builtins.lc 67:20-79:24 Type
834testdata/Builtins.lc 67:20-89:36 V1
835testdata/Builtins.lc 67:20-90:31 V1
836testdata/Builtins.lc 68:10-68:13 Float 807testdata/Builtins.lc 68:10-68:13 Float
808testdata/Builtins.lc 68:10-89:36 V1
837testdata/Builtins.lc 69:9-69:12 Float 809testdata/Builtins.lc 69:9-69:12 Float
838testdata/Builtins.lc 70:21-70:25 Type 810testdata/Builtins.lc 69:9-90:31 V1
839testdata/Builtins.lc 70:21-79:24 Type
840testdata/Builtins.lc 70:21-89:36 V1->V2
841testdata/Builtins.lc 70:21-90:31 V1->V2
842testdata/Builtins.lc 71:10-71:12 {a} -> a -> a -> VecS a 2 811testdata/Builtins.lc 71:10-71:12 {a} -> a -> a -> VecS a 2
843testdata/Builtins.lc 71:10-71:16 Float -> VecS Float 2 812testdata/Builtins.lc 71:10-71:16 Float -> VecS Float 2
844testdata/Builtins.lc 71:10-71:20 VecS Float 2 813testdata/Builtins.lc 71:10-71:20 VecS Float 2
@@ -887,9 +856,6 @@ testdata/Builtins.lc 78:12-78:15 Float
887testdata/Builtins.lc 78:16-78:19 Float 856testdata/Builtins.lc 78:16-78:19 Float
888testdata/Builtins.lc 78:20-78:23 Float 857testdata/Builtins.lc 78:20-78:23 Float
889testdata/Builtins.lc 78:24-78:27 Float 858testdata/Builtins.lc 78:24-78:27 Float
890testdata/Builtins.lc 79:20-79:24 Type
891testdata/Builtins.lc 79:20-80:15 V1->V2
892testdata/Builtins.lc 79:20-81:13 V1->V2
893testdata/Builtins.lc 80:10-80:15 Bool 859testdata/Builtins.lc 80:10-80:15 Bool
894testdata/Builtins.lc 81:9-81:13 Bool 860testdata/Builtins.lc 81:9-81:13 Bool
895testdata/Builtins.lc 83:10-83:12 {a} -> a -> a -> VecS a 2 861testdata/Builtins.lc 83:10-83:12 {a} -> a -> a -> VecS a 2
@@ -939,15 +905,7 @@ testdata/Builtins.lc 90:17-90:21 Bool
939testdata/Builtins.lc 90:22-90:26 Bool 905testdata/Builtins.lc 90:22-90:26 Bool
940testdata/Builtins.lc 90:27-90:31 Bool 906testdata/Builtins.lc 90:27-90:31 Bool
941testdata/Builtins.lc 92:7-92:15 Type->Type 907testdata/Builtins.lc 92:7-92:15 Type->Type
942testdata/Builtins.lc 94:25-94:28 Type
943testdata/Builtins.lc 94:25-95:29 Type | Type->Type
944testdata/Builtins.lc 95:25-95:29 Type
945testdata/Builtins.lc 97:7-97:15 Type->Type 908testdata/Builtins.lc 97:7-97:15 Type->Type
946testdata/Builtins.lc 99:25-99:30 Type
947testdata/Builtins.lc 99:25-103:29 Type | Type->Type
948testdata/Builtins.lc 100:26-100:30 Type
949testdata/Builtins.lc 100:26-103:29 Type
950testdata/Builtins.lc 103:26-103:29 Type
951testdata/Builtins.lc 118:1-118:8 {a} -> {b : Num (MatVecScalarElem a)} -> a -> a->a 909testdata/Builtins.lc 118:1-118:8 {a} -> {b : Num (MatVecScalarElem a)} -> a -> a->a
952testdata/Builtins.lc 118:10-118:17 {a} -> {b : Num (MatVecScalarElem a)} -> a -> a->a 910testdata/Builtins.lc 118:10-118:17 {a} -> {b : Num (MatVecScalarElem a)} -> a -> a->a
953testdata/Builtins.lc 118:19-118:26 {a} -> {b : Num (MatVecScalarElem a)} -> a -> a->a 911testdata/Builtins.lc 118:19-118:26 {a} -> {b : Num (MatVecScalarElem a)} -> a -> a->a
@@ -1907,8 +1865,6 @@ testdata/Builtins.lc 187:55-187:66 Type
1907testdata/Builtins.lc 187:59-187:60 V1 1865testdata/Builtins.lc 187:59-187:60 V1
1908testdata/Builtins.lc 187:61-187:66 Type 1866testdata/Builtins.lc 187:61-187:66 Type
1909testdata/Builtins.lc 201:1-201:5 {a} -> List a -> a 1867testdata/Builtins.lc 201:1-201:5 {a} -> List a -> a
1910testdata/Builtins.lc 201:8-201:9 V2
1911testdata/Builtins.lc 201:8-201:16 V0
1912testdata/Builtins.lc 201:15-201:16 List V2 -> V2 | V1 -> List V2 -> V2 | V3 1868testdata/Builtins.lc 201:15-201:16 List V2 -> V2 | V1 -> List V2 -> V2 | V3
1913testdata/Builtins.lc 203:6-203:8 {a} -> List a -> List a -> List a 1869testdata/Builtins.lc 203:6-203:8 {a} -> List a -> List a -> List a
1914testdata/Builtins.lc 203:14-203:16 V3 1870testdata/Builtins.lc 203:14-203:16 V3
@@ -2149,7 +2105,7 @@ testdata/Builtins.lc 270:53-270:54 V1
2149testdata/Builtins.lc 272:6-272:20 Type | Type->Type 2105testdata/Builtins.lc 272:6-272:20 Type | Type->Type
2150testdata/Builtins.lc 272:6-272:39 Type 2106testdata/Builtins.lc 272:6-272:39 Type
2151testdata/Builtins.lc 272:6-274:29 Type 2107testdata/Builtins.lc 272:6-274:29 Type
2152testdata/Builtins.lc 272:25-272:39 SimpleFragment V3 | Type | V2 | {a} -> Vec 3 Float -> a -> SimpleFragment a 2108testdata/Builtins.lc 272:25-272:39 SimpleFragment V3 | Type | {a} -> Vec 3 Float -> a -> SimpleFragment a
2153testdata/Builtins.lc 273:7-273:22 {a} -> SimpleFragment a -> VecS Float 3 2109testdata/Builtins.lc 273:7-273:22 {a} -> SimpleFragment a -> VecS Float 3
2154testdata/Builtins.lc 273:28-273:31 Nat -> Type->Type 2110testdata/Builtins.lc 273:28-273:31 Nat -> Type->Type
2155testdata/Builtins.lc 273:28-273:33 Type->Type 2111testdata/Builtins.lc 273:28-273:33 Type->Type
@@ -2279,11 +2235,9 @@ testdata/Builtins.lc 299:7-299:14 ImageKind
2279testdata/Builtins.lc 301:14-301:23 Type 2235testdata/Builtins.lc 301:14-301:23 Type
2280testdata/Builtins.lc 301:27-301:31 Type 2236testdata/Builtins.lc 301:27-301:31 Type
2281testdata/Builtins.lc 302:1-302:10 ImageKind->Type 2237testdata/Builtins.lc 302:1-302:10 ImageKind->Type
2282testdata/Builtins.lc 302:12-302:17 ImageKind
2283testdata/Builtins.lc 302:12-304:25 ImageKind->Type | Type
2284testdata/Builtins.lc 302:23-302:24 Type | Type->V1 2238testdata/Builtins.lc 302:23-302:24 Type | Type->V1
2285testdata/Builtins.lc 302:23-303:25 Type -> ImageKind->Type 2239testdata/Builtins.lc 302:23-303:25 Type -> ImageKind->Type
2286testdata/Builtins.lc 302:23-304:25 ImageKind->Type 2240testdata/Builtins.lc 302:23-304:25 ImageKind->Type | Type
2287testdata/Builtins.lc 303:19-303:25 Type 2241testdata/Builtins.lc 303:19-303:25 Type
2288testdata/Builtins.lc 304:21-304:25 Type 2242testdata/Builtins.lc 304:21-304:25 Type
2289testdata/Builtins.lc 306:6-306:11 Nat -> ImageKind->Type | Type 2243testdata/Builtins.lc 306:6-306:11 Nat -> ImageKind->Type | Type
@@ -2355,28 +2309,20 @@ testdata/Builtins.lc 339:38-339:43 Type
2355testdata/Builtins.lc 339:38-339:48 Type 2309testdata/Builtins.lc 339:38-339:48 Type
2356testdata/Builtins.lc 339:47-339:48 Type 2310testdata/Builtins.lc 339:47-339:48 Type
2357testdata/Builtins.lc 340:1-340:12 {a} -> {b:Nat} -> Vec b a -> Swizz->a 2311testdata/Builtins.lc 340:1-340:12 {a} -> {b:Nat} -> Vec b a -> Swizz->a
2358testdata/Builtins.lc 340:14-340:16 Vec V4 V5
2359testdata/Builtins.lc 340:14-348:32 Swizz->V3 | V3 | Vec V0 V1 -> Swizz->V3
2360testdata/Builtins.lc 340:22-340:24 Swizz
2361testdata/Builtins.lc 340:22-341:28 V1 -> V2->V2 | V2 | V2->V2
2362testdata/Builtins.lc 340:22-344:30 (V0 -> V1 -> V2 -> V3->V4) -> {f:Nat} -> VecS V2 f -> V3
2363testdata/Builtins.lc 340:22-348:32 {a:Nat} -> VecS V1 a -> V2
2364testdata/Builtins.lc 340:27-340:28 V4 2312testdata/Builtins.lc 340:27-340:28 V4
2365testdata/Builtins.lc 340:27-341:28 V3 -> V4 -> Swizz->V6 2313testdata/Builtins.lc 340:27-341:28 V1 -> V2->V2 | V2 | V2->V2 | V3 -> V4 -> Swizz->V6
2314testdata/Builtins.lc 340:27-344:30 (V0 -> V1 -> V2 -> V3->V4) -> {f:Nat} -> VecS V2 f -> V3
2315testdata/Builtins.lc 340:27-348:32 Swizz->V3 | V3 | Vec V0 V1 -> Swizz->V3 | {a:Nat} -> VecS V1 a -> V2
2366testdata/Builtins.lc 341:27-341:28 V3 2316testdata/Builtins.lc 341:27-341:28 V3
2367testdata/Builtins.lc 342:24-342:26 Swizz
2368testdata/Builtins.lc 342:24-344:30 V0 -> V1 -> V2->V3 | V1 -> V2->V3 | V2->V3 | V3
2369testdata/Builtins.lc 342:29-342:30 V4 2317testdata/Builtins.lc 342:29-342:30 V4
2370testdata/Builtins.lc 342:29-343:30 V3 -> V4 -> Swizz->V6 2318testdata/Builtins.lc 342:29-343:30 V3 -> V4 -> Swizz->V6
2371testdata/Builtins.lc 342:29-344:30 V3 -> Swizz->V5 2319testdata/Builtins.lc 342:29-344:30 V0 -> V1 -> V2->V3 | V1 -> V2->V3 | V2->V3 | V3 | V3 -> Swizz->V5
2372testdata/Builtins.lc 343:29-343:30 V3 2320testdata/Builtins.lc 343:29-343:30 V3
2373testdata/Builtins.lc 344:29-344:30 V3 2321testdata/Builtins.lc 344:29-344:30 V3
2374testdata/Builtins.lc 345:26-345:28 Swizz
2375testdata/Builtins.lc 345:26-348:32 V0 -> V1 -> V2 -> V3->V4 | V1 -> V2 -> V3->V4 | V2 -> V3->V4 | V3->V4 | V4
2376testdata/Builtins.lc 345:31-345:32 V5 2322testdata/Builtins.lc 345:31-345:32 V5
2377testdata/Builtins.lc 345:31-346:32 V4 -> V5 -> Swizz->V7 2323testdata/Builtins.lc 345:31-346:32 V4 -> V5 -> Swizz->V7
2378testdata/Builtins.lc 345:31-347:32 V4 -> Swizz->V6 2324testdata/Builtins.lc 345:31-347:32 V4 -> Swizz->V6
2379testdata/Builtins.lc 345:31-348:32 Swizz->V5 2325testdata/Builtins.lc 345:31-348:32 Swizz->V5 | V0 -> V1 -> V2 -> V3->V4 | V1 -> V2 -> V3->V4 | V2 -> V3->V4 | V3->V4 | V4
2380testdata/Builtins.lc 346:31-346:32 V4 2326testdata/Builtins.lc 346:31-346:32 V4
2381testdata/Builtins.lc 347:31-347:32 V4 2327testdata/Builtins.lc 347:31-347:32 V4
2382testdata/Builtins.lc 348:31-348:32 V4 2328testdata/Builtins.lc 348:31-348:32 V4
@@ -2388,11 +2334,9 @@ testdata/Builtins.lc 351:32-351:33 V1
2388testdata/Builtins.lc 351:34-351:35 V2 2334testdata/Builtins.lc 351:34-351:35 V2
2389testdata/Builtins.lc 351:39-351:43 Type 2335testdata/Builtins.lc 351:39-351:43 Type
2390testdata/Builtins.lc 352:1-352:11 {a} -> {b:Nat} -> Vec b a -> Bool 2336testdata/Builtins.lc 352:1-352:11 {a} -> {b:Nat} -> Vec b a -> Bool
2391testdata/Builtins.lc 352:13-352:15 Vec V3 V4
2392testdata/Builtins.lc 352:13-354:31 Bool | Vec V0 V1 -> Bool
2393testdata/Builtins.lc 352:23-352:27 Bool | V1 -> V2->V2 | V2->V2 2337testdata/Builtins.lc 352:23-352:27 Bool | V1 -> V2->V2 | V2->V2
2394testdata/Builtins.lc 352:23-353:29 (V0 -> V1 -> V2 -> V3->Bool) -> {f:Nat} -> VecS V2 f -> Bool 2338testdata/Builtins.lc 352:23-353:29 (V0 -> V1 -> V2 -> V3->Bool) -> {f:Nat} -> VecS V2 f -> Bool
2395testdata/Builtins.lc 352:23-354:31 {a:Nat} -> VecS V1 a -> Bool 2339testdata/Builtins.lc 352:23-354:31 Bool | Vec V0 V1 -> Bool | {a:Nat} -> VecS V1 a -> Bool
2396testdata/Builtins.lc 353:25-353:29 Bool | V0 -> V1 -> V2->Bool | V1 -> V2->Bool | V2->Bool 2340testdata/Builtins.lc 353:25-353:29 Bool | V0 -> V1 -> V2->Bool | V1 -> V2->Bool | V2->Bool
2397testdata/Builtins.lc 354:27-354:31 Bool | V0 -> V1 -> V2 -> V3->Bool | V1 -> V2 -> V3->Bool | V2 -> V3->Bool | V3->Bool 2341testdata/Builtins.lc 354:27-354:31 Bool | V0 -> V1 -> V2 -> V3->Bool | V1 -> V2 -> V3->Bool | V2 -> V3->Bool | V3->Bool
2398testdata/Builtins.lc 356:16-356:71 Type 2342testdata/Builtins.lc 356:16-356:71 Type
@@ -2769,9 +2713,7 @@ testdata/Builtins.lc 488:67-488:70 V7
2769testdata/Builtins.lc 488:72-488:73 V3 2713testdata/Builtins.lc 488:72-488:73 V3
2770testdata/Builtins.lc 490:26-490:29 Type 2714testdata/Builtins.lc 490:26-490:29 Type
2771testdata/Builtins.lc 490:36-490:43 Type->Nat 2715testdata/Builtins.lc 490:36-490:43 Type->Nat
2772testdata/Builtins.lc 490:45-490:50 Type 2716testdata/Builtins.lc 490:58-490:59 ImageKind->Nat | Nat | Nat -> ImageKind->Nat | Type->Nat
2773testdata/Builtins.lc 490:45-490:59 Nat->Nat | Type->Nat
2774testdata/Builtins.lc 490:58-490:59 ImageKind->Nat | Nat | Nat -> ImageKind->Nat
2775testdata/Builtins.lc 492:12-492:15 Type 2717testdata/Builtins.lc 492:12-492:15 Type
2776testdata/Builtins.lc 492:12-492:23 Type 2718testdata/Builtins.lc 492:12-492:23 Type
2777testdata/Builtins.lc 492:12-495:50 V0->V1 | {a} -> List a -> Type 2719testdata/Builtins.lc 492:12-495:50 V0->V1 | {a} -> List a -> Type
@@ -2815,12 +2757,10 @@ testdata/Builtins.lc 511:16-511:25 Type
2815testdata/Builtins.lc 511:30-511:36 Type 2757testdata/Builtins.lc 511:30-511:36 Type
2816testdata/Builtins.lc 511:31-511:35 Type 2758testdata/Builtins.lc 511:31-511:35 Type
2817testdata/Builtins.lc 512:1-512:11 List ImageKind -> List Type 2759testdata/Builtins.lc 512:1-512:11 List ImageKind -> List Type
2818testdata/Builtins.lc 512:18-512:19 List ImageKind
2819testdata/Builtins.lc 512:18-513:31 List ImageKind -> List Type | List Type
2820testdata/Builtins.lc 512:25-512:28 {a} -> {b} -> a->b -> List a -> List b 2760testdata/Builtins.lc 512:25-512:28 {a} -> {b} -> a->b -> List a -> List b
2821testdata/Builtins.lc 512:25-512:38 List ImageKind -> List Type 2761testdata/Builtins.lc 512:25-512:38 List ImageKind -> List Type
2822testdata/Builtins.lc 512:25-512:40 List Type 2762testdata/Builtins.lc 512:25-512:40 List Type
2823testdata/Builtins.lc 512:25-513:31 List Type | List Type -> ImageKind -> List Type | List V1 -> List Type | V0 -> List V1 -> List Type 2763testdata/Builtins.lc 512:25-513:31 List ImageKind -> List Type | List Type | List Type -> ImageKind -> List Type | List V1 -> List Type | V0 -> List V1 -> List Type
2824testdata/Builtins.lc 512:29-512:38 ImageKind->Type 2764testdata/Builtins.lc 512:29-512:38 ImageKind->Type
2825testdata/Builtins.lc 512:39-512:40 List V2 2765testdata/Builtins.lc 512:39-512:40 List V2
2826testdata/Builtins.lc 513:16-513:19 {a} -> {b} -> a->b -> List a -> List b 2766testdata/Builtins.lc 513:16-513:19 {a} -> {b} -> a->b -> List a -> List b
@@ -2830,9 +2770,7 @@ testdata/Builtins.lc 513:20-513:29 ImageKind->Type
2830testdata/Builtins.lc 513:30-513:31 List ImageKind 2770testdata/Builtins.lc 513:30-513:31 List ImageKind
2831testdata/Builtins.lc 515:40-515:49 Type 2771testdata/Builtins.lc 515:40-515:49 Type
2832testdata/Builtins.lc 515:56-515:77 Type->ImageKind 2772testdata/Builtins.lc 515:56-515:77 Type->ImageKind
2833testdata/Builtins.lc 515:79-515:96 Type 2773testdata/Builtins.lc 515:102-515:103 ImageKind | ImageKind->ImageKind | Type->ImageKind
2834testdata/Builtins.lc 515:79-515:103 ImageKind->ImageKind | Type->ImageKind
2835testdata/Builtins.lc 515:102-515:103 ImageKind | ImageKind->ImageKind
2836testdata/Builtins.lc 517:1-517:11 {a : List ImageKind} -> {b:Nat} -> {c : List Type} -> {d : a ~ 'map Type ImageKind FragmentOperationKind c} -> HList c -> FragmentStream b (HList ('imageType' a)) -> FrameBuffer b a -> FrameBuffer b a 2774testdata/Builtins.lc 517:1-517:11 {a : List ImageKind} -> {b:Nat} -> {c : List Type} -> {d : a ~ 'map Type ImageKind FragmentOperationKind c} -> HList c -> FragmentStream b (HList ('imageType' a)) -> FrameBuffer b a -> FrameBuffer b a
2837testdata/Builtins.lc 517:15-517:174 Type 2775testdata/Builtins.lc 517:15-517:174 Type
2838testdata/Builtins.lc 517:28-517:31 Type 2776testdata/Builtins.lc 517:28-517:31 Type
@@ -2888,9 +2826,7 @@ testdata/Builtins.lc 520:40-520:43 V7
2888testdata/Builtins.lc 520:44-520:46 V13 2826testdata/Builtins.lc 520:44-520:46 V13
2889testdata/Builtins.lc 524:31-524:40 Type 2827testdata/Builtins.lc 524:31-524:40 Type
2890testdata/Builtins.lc 524:47-524:59 Type->ImageKind 2828testdata/Builtins.lc 524:47-524:59 Type->ImageKind
2891testdata/Builtins.lc 524:61-524:66 Type 2829testdata/Builtins.lc 524:74-524:75 ImageKind | ImageKind->ImageKind | Nat -> ImageKind->ImageKind | Type->ImageKind
2892testdata/Builtins.lc 524:61-524:75 ImageKind->ImageKind | Type->ImageKind
2893testdata/Builtins.lc 524:74-524:75 ImageKind | ImageKind->ImageKind | Nat -> ImageKind->ImageKind
2894testdata/Builtins.lc 530:1-530:12 {a : List Type} -> {b : 'sameLayerCounts a} -> HList a -> FrameBuffer (ImageLC ('head Type a)) ('map Type ImageKind GetImageKind a) 2830testdata/Builtins.lc 530:1-530:12 {a : List Type} -> {b : 'sameLayerCounts a} -> HList a -> FrameBuffer (ImageLC ('head Type a)) ('map Type ImageKind GetImageKind a)
2895testdata/Builtins.lc 530:30-530:36 Type 2831testdata/Builtins.lc 530:30-530:36 Type
2896testdata/Builtins.lc 530:31-530:35 Type 2832testdata/Builtins.lc 530:31-530:35 Type
diff --git a/testdata/Internals.out b/testdata/Internals.out
index 0d1624b3..568351c5 100644
--- a/testdata/Internals.out
+++ b/testdata/Internals.out
@@ -235,14 +235,10 @@ testdata/Internals.lc 74:32-74:33 Type
235testdata/Internals.lc 74:32-74:38 Type 235testdata/Internals.lc 74:32-74:38 Type
236testdata/Internals.lc 74:37-74:38 Type 236testdata/Internals.lc 74:37-74:38 Type
237testdata/Internals.lc 75:1-75:15 {a} -> Bool -> a -> a->a 237testdata/Internals.lc 75:1-75:15 {a} -> Bool -> a -> a->a
238testdata/Internals.lc 75:16-75:20 Bool
239testdata/Internals.lc 75:16-76:29 Bool -> V1 -> V2->V3 | V1 -> V2->V3 | V2->V3 | V3
240testdata/Internals.lc 75:28-75:29 V3 238testdata/Internals.lc 75:28-75:29 V3
241testdata/Internals.lc 75:28-76:29 Bool->V4 239testdata/Internals.lc 75:28-76:29 Bool -> V1 -> V2->V3 | Bool->V4 | V1 -> V2->V3 | V2->V3 | V3
242testdata/Internals.lc 76:28-76:29 V4 240testdata/Internals.lc 76:28-76:29 V4
243testdata/Internals.lc 78:1-78:5 Ordering->Bool 241testdata/Internals.lc 78:1-78:5 Ordering->Bool
244testdata/Internals.lc 78:6-78:8 V1
245testdata/Internals.lc 78:6-79:15 Bool
246testdata/Internals.lc 78:11-78:15 Bool 242testdata/Internals.lc 78:11-78:15 Bool
247testdata/Internals.lc 78:11-79:15 Bool -> Ordering->Bool 243testdata/Internals.lc 78:11-79:15 Bool -> Ordering->Bool
248testdata/Internals.lc 79:10-79:15 Bool 244testdata/Internals.lc 79:10-79:15 Bool
@@ -264,43 +260,24 @@ testdata/Internals.lc 85:3-85:9 {a} -> {b : Num a} -> a->a
264testdata/Internals.lc 85:13-85:14 Type 260testdata/Internals.lc 85:13-85:14 Type
265testdata/Internals.lc 85:13-85:19 Type 261testdata/Internals.lc 85:13-85:19 Type
266testdata/Internals.lc 85:18-85:19 Type 262testdata/Internals.lc 85:18-85:19 Type
267testdata/Internals.lc 87:14-87:17 Type 263testdata/Internals.lc 88:13-100:25 Int->V2 | {a : Num V0} -> Int->V2 | {a} -> {b : Num a} -> Int->a
268testdata/Internals.lc 87:14-88:20 Int->V2 -> Int->V3
269testdata/Internals.lc 87:14-89:27 (V1 -> V2->Ordering) -> V2 -> V3->Ordering
270testdata/Internals.lc 87:14-90:26 V1->V2 -> V2->V3
271testdata/Internals.lc 87:14-99:17 Type | Type->Type
272testdata/Internals.lc 87:14-100:25 Int->V2 | {a : Num V0} -> Int->V2 | {a} -> {b : Num a} -> Int->a
273testdata/Internals.lc 87:14-101:22 V1 -> V2->Ordering | {a : Num V0} -> V1 -> V2->Ordering | {a} -> {b : Num a} -> a -> a->Ordering
274testdata/Internals.lc 87:14-102:22 V1->V2 | {a : Num V0} -> V1->V2 | {a} -> {b : Num a} -> a->a
275testdata/Internals.lc 88:19-88:20 V1 264testdata/Internals.lc 88:19-88:20 V1
276testdata/Internals.lc 89:13-89:27 Int -> Int->Ordering 265testdata/Internals.lc 89:13-89:27 Int -> Int->Ordering
266testdata/Internals.lc 89:13-101:22 V1 -> V2->Ordering | {a : Num V0} -> V1 -> V2->Ordering | {a} -> {b : Num a} -> a -> a->Ordering
277testdata/Internals.lc 90:13-90:26 Int->Int 267testdata/Internals.lc 90:13-90:26 Int->Int
278testdata/Internals.lc 91:14-91:18 Type 268testdata/Internals.lc 90:13-102:22 V1->V2 | {a : Num V0} -> V1->V2 | {a} -> {b : Num a} -> a->a
279testdata/Internals.lc 91:14-92:26 Int->V2 -> Int->V3
280testdata/Internals.lc 91:14-93:28 (V1 -> V2->Ordering) -> V2 -> V3->Ordering
281testdata/Internals.lc 91:14-94:27 V1->V2 -> V2->V3
282testdata/Internals.lc 91:14-99:17 Type
283testdata/Internals.lc 91:14-100:25 Int->V2
284testdata/Internals.lc 91:14-101:22 V1 -> V2->Ordering
285testdata/Internals.lc 91:14-102:22 V1->V2
286testdata/Internals.lc 92:13-92:26 Int->Word 269testdata/Internals.lc 92:13-92:26 Int->Word
270testdata/Internals.lc 92:13-100:25 Int->V2
287testdata/Internals.lc 93:13-93:28 Word -> Word->Ordering 271testdata/Internals.lc 93:13-93:28 Word -> Word->Ordering
272testdata/Internals.lc 93:13-101:22 V1 -> V2->Ordering
288testdata/Internals.lc 94:13-94:27 Word->Word 273testdata/Internals.lc 94:13-94:27 Word->Word
289testdata/Internals.lc 95:14-95:19 Type 274testdata/Internals.lc 94:13-102:22 V1->V2
290testdata/Internals.lc 95:14-96:27 Int->V2 -> Int->V3
291testdata/Internals.lc 95:14-97:29 (V1 -> V2->Ordering) -> V2 -> V3->Ordering
292testdata/Internals.lc 95:14-98:28 V1->V2 -> V2->V3
293testdata/Internals.lc 95:14-99:17 Type
294testdata/Internals.lc 95:14-100:25 Int->V2
295testdata/Internals.lc 95:14-101:22 V1 -> V2->Ordering
296testdata/Internals.lc 95:14-102:22 V1->V2
297testdata/Internals.lc 96:13-96:27 Int->Float 275testdata/Internals.lc 96:13-96:27 Int->Float
276testdata/Internals.lc 96:13-100:25 Int->V2
298testdata/Internals.lc 97:13-97:29 Float -> Float->Ordering 277testdata/Internals.lc 97:13-97:29 Float -> Float->Ordering
278testdata/Internals.lc 97:13-101:22 V1 -> V2->Ordering
299testdata/Internals.lc 98:13-98:28 Float->Float 279testdata/Internals.lc 98:13-98:28 Float->Float
300testdata/Internals.lc 99:14-99:17 Type 280testdata/Internals.lc 98:13-102:22 V1->V2
301testdata/Internals.lc 99:14-100:25 Int->V2 -> Int->V3
302testdata/Internals.lc 99:14-101:22 (V1 -> V2->Ordering) -> V2 -> V3->Ordering
303testdata/Internals.lc 99:14-102:22 V1->V2 -> V2->V3
304testdata/Internals.lc 100:13-100:25 Int->Nat 281testdata/Internals.lc 100:13-100:25 Int->Nat
305testdata/Internals.lc 101:13-101:22 {a}->a 282testdata/Internals.lc 101:13-101:22 {a}->a
306testdata/Internals.lc 102:13-102:22 {a}->a 283testdata/Internals.lc 102:13-102:22 {a}->a
@@ -313,75 +290,46 @@ testdata/Internals.lc 105:13-105:27 Type
313testdata/Internals.lc 105:18-105:19 Type 290testdata/Internals.lc 105:18-105:19 Type
314testdata/Internals.lc 105:18-105:27 Type 291testdata/Internals.lc 105:18-105:27 Type
315testdata/Internals.lc 105:23-105:27 Type 292testdata/Internals.lc 105:23-105:27 Type
316testdata/Internals.lc 109:13-109:19 Type
317testdata/Internals.lc 109:13-109:63 (V1 -> V2->Bool) -> V2 -> V3->Bool
318testdata/Internals.lc 109:13-117:16 Type | Type->Type
319testdata/Internals.lc 109:13-120:29 V1 -> V2->Bool | {a : Eq V0} -> V1 -> V2->Bool | {a} -> {b : Eq a} -> a -> a->Bool
320testdata/Internals.lc 109:35-109:39 Ordering->Bool 293testdata/Internals.lc 109:35-109:39 Ordering->Bool
321testdata/Internals.lc 109:35-109:63 Bool 294testdata/Internals.lc 109:35-109:63 Bool
295testdata/Internals.lc 109:35-120:29 V1 -> V2->Bool | {a : Eq V0} -> V1 -> V2->Bool | {a} -> {b : Eq a} -> a -> a->Bool
322testdata/Internals.lc 109:41-109:58 String -> String->Ordering 296testdata/Internals.lc 109:41-109:58 String -> String->Ordering
323testdata/Internals.lc 109:41-109:60 String->Ordering 297testdata/Internals.lc 109:41-109:60 String->Ordering
324testdata/Internals.lc 109:41-109:62 Ordering 298testdata/Internals.lc 109:41-109:62 Ordering
325testdata/Internals.lc 109:59-109:60 V3 299testdata/Internals.lc 109:59-109:60 V3
326testdata/Internals.lc 109:61-109:62 V1 300testdata/Internals.lc 109:61-109:62 V1
327testdata/Internals.lc 110:13-110:17 Type
328testdata/Internals.lc 110:13-110:59 (V1 -> V2->Bool) -> V2 -> V3->Bool
329testdata/Internals.lc 110:13-117:16 Type
330testdata/Internals.lc 110:13-120:29 V1 -> V2->Bool
331testdata/Internals.lc 110:33-110:37 Ordering->Bool 301testdata/Internals.lc 110:33-110:37 Ordering->Bool
332testdata/Internals.lc 110:33-110:59 Bool 302testdata/Internals.lc 110:33-110:59 Bool
303testdata/Internals.lc 110:33-120:29 V1 -> V2->Bool
333testdata/Internals.lc 110:39-110:54 Char -> Char->Ordering 304testdata/Internals.lc 110:39-110:54 Char -> Char->Ordering
334testdata/Internals.lc 110:39-110:56 Char->Ordering 305testdata/Internals.lc 110:39-110:56 Char->Ordering
335testdata/Internals.lc 110:39-110:58 Ordering 306testdata/Internals.lc 110:39-110:58 Ordering
336testdata/Internals.lc 110:55-110:56 V3 307testdata/Internals.lc 110:55-110:56 V3
337testdata/Internals.lc 110:57-110:58 V1 308testdata/Internals.lc 110:57-110:58 V1
338testdata/Internals.lc 111:13-111:16 Type
339testdata/Internals.lc 111:13-111:57 (V1 -> V2->Bool) -> V2 -> V3->Bool
340testdata/Internals.lc 111:13-117:16 Type
341testdata/Internals.lc 111:13-120:29 V1 -> V2->Bool
342testdata/Internals.lc 111:32-111:36 Ordering->Bool 309testdata/Internals.lc 111:32-111:36 Ordering->Bool
343testdata/Internals.lc 111:32-111:57 Bool 310testdata/Internals.lc 111:32-111:57 Bool
311testdata/Internals.lc 111:32-120:29 V1 -> V2->Bool
344testdata/Internals.lc 111:38-111:52 Int -> Int->Ordering 312testdata/Internals.lc 111:38-111:52 Int -> Int->Ordering
345testdata/Internals.lc 111:38-111:54 Int->Ordering 313testdata/Internals.lc 111:38-111:54 Int->Ordering
346testdata/Internals.lc 111:38-111:56 Ordering 314testdata/Internals.lc 111:38-111:56 Ordering
347testdata/Internals.lc 111:53-111:54 V3 315testdata/Internals.lc 111:53-111:54 V3
348testdata/Internals.lc 111:55-111:56 V1 316testdata/Internals.lc 111:55-111:56 V1
349testdata/Internals.lc 112:13-112:18 Type
350testdata/Internals.lc 112:13-112:61 (V1 -> V2->Bool) -> V2 -> V3->Bool
351testdata/Internals.lc 112:13-117:16 Type
352testdata/Internals.lc 112:13-120:29 V1 -> V2->Bool
353testdata/Internals.lc 112:34-112:38 Ordering->Bool 317testdata/Internals.lc 112:34-112:38 Ordering->Bool
354testdata/Internals.lc 112:34-112:61 Bool 318testdata/Internals.lc 112:34-112:61 Bool
319testdata/Internals.lc 112:34-120:29 V1 -> V2->Bool
355testdata/Internals.lc 112:40-112:56 Float -> Float->Ordering 320testdata/Internals.lc 112:40-112:56 Float -> Float->Ordering
356testdata/Internals.lc 112:40-112:58 Float->Ordering 321testdata/Internals.lc 112:40-112:58 Float->Ordering
357testdata/Internals.lc 112:40-112:60 Ordering 322testdata/Internals.lc 112:40-112:60 Ordering
358testdata/Internals.lc 112:57-112:58 V3 323testdata/Internals.lc 112:57-112:58 V3
359testdata/Internals.lc 112:59-112:60 V1 324testdata/Internals.lc 112:59-112:60 V1
360testdata/Internals.lc 113:13-113:17 Type
361testdata/Internals.lc 113:13-116:19 (V1 -> V2->Bool) -> V2 -> V3->Bool
362testdata/Internals.lc 113:13-117:16 Type
363testdata/Internals.lc 113:13-120:29 V1 -> V2->Bool
364testdata/Internals.lc 114:5-114:9 V2
365testdata/Internals.lc 114:5-116:19 Bool
366testdata/Internals.lc 114:13-114:17 Bool
367testdata/Internals.lc 114:13-116:19 Bool
368testdata/Internals.lc 114:20-114:24 Bool 325testdata/Internals.lc 114:20-114:24 Bool
369testdata/Internals.lc 114:20-116:19 Bool->Bool 326testdata/Internals.lc 114:20-116:19 Bool | Bool->Bool
370testdata/Internals.lc 115:14-115:19 V1 327testdata/Internals.lc 114:20-120:29 V1 -> V2->Bool
371testdata/Internals.lc 115:14-116:19 Bool
372testdata/Internals.lc 115:22-115:26 Bool 328testdata/Internals.lc 115:22-115:26 Bool
373testdata/Internals.lc 115:22-116:19 Bool->Bool 329testdata/Internals.lc 115:22-116:19 Bool | Bool->Bool
374testdata/Internals.lc 116:14-116:19 Bool 330testdata/Internals.lc 116:14-116:19 Bool
375testdata/Internals.lc 117:13-117:16 Type
376testdata/Internals.lc 117:13-120:29 (V1 -> V2->Bool) -> V2 -> V3->Bool
377testdata/Internals.lc 118:5-118:9 V2
378testdata/Internals.lc 118:5-120:29 Bool
379testdata/Internals.lc 118:15-118:19 V1
380testdata/Internals.lc 118:15-120:29 Bool
381testdata/Internals.lc 118:24-118:28 Bool 331testdata/Internals.lc 118:24-118:28 Bool
382testdata/Internals.lc 118:24-120:29 Nat->Bool 332testdata/Internals.lc 118:24-120:29 Nat->Bool
383testdata/Internals.lc 119:15-119:19 Nat
384testdata/Internals.lc 119:15-120:29 Bool | Nat->Bool
385testdata/Internals.lc 119:24-119:25 Nat 333testdata/Internals.lc 119:24-119:25 Nat
386testdata/Internals.lc 119:24-119:28 Nat->Bool 334testdata/Internals.lc 119:24-119:28 Nat->Bool
387testdata/Internals.lc 119:24-119:30 Bool | Nat->Bool 335testdata/Internals.lc 119:24-119:30 Bool | Nat->Bool
diff --git a/testdata/Material.out b/testdata/Material.out
index 816ce7ad..2972a98e 100644
--- a/testdata/Material.out
+++ b/testdata/Material.out
@@ -163,7 +163,7 @@ testdata/Material.lc 8:17-8:18 V1
163testdata/Material.lc 10:6-10:12 Type 163testdata/Material.lc 10:6-10:12 Type
164testdata/Material.lc 10:6-11:13 Type 164testdata/Material.lc 10:6-11:13 Type
165testdata/Material.lc 10:6-15:39 Type 165testdata/Material.lc 10:6-15:39 Type
166testdata/Material.lc 11:7-11:13 Entity | Type | V1 | Vec 4 Float -> Vec 4 Float -> Vec 3 Float -> Vec 4 Float -> Entity 166testdata/Material.lc 11:7-11:13 Entity | Type | Vec 4 Float -> Vec 4 Float -> Vec 3 Float -> Vec 4 Float -> Entity
167testdata/Material.lc 12:7-12:20 Entity -> VecS Float 4 167testdata/Material.lc 12:7-12:20 Entity -> VecS Float 4
168testdata/Material.lc 12:28-12:31 Nat -> Type->Type 168testdata/Material.lc 12:28-12:31 Nat -> Type->Type
169testdata/Material.lc 12:28-12:33 Type->Type 169testdata/Material.lc 12:28-12:33 Type->Type
@@ -360,7 +360,7 @@ testdata/Material.lc 127:7-127:15 DepthFunction
360testdata/Material.lc 130:6-130:16 Type 360testdata/Material.lc 130:6-130:16 Type
361testdata/Material.lc 130:6-131:17 Type 361testdata/Material.lc 130:6-131:17 Type
362testdata/Material.lc 130:6-144:34 Type 362testdata/Material.lc 130:6-144:34 Type
363testdata/Material.lc 131:7-131:17 Maybe (Blending', Blending') -> RGBGen -> AlphaGen -> TCGen -> List TCMod -> StageTexture -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String->StageAttrs | StageAttrs | Type | V1 363testdata/Material.lc 131:7-131:17 Maybe (Blending', Blending') -> RGBGen -> AlphaGen -> TCGen -> List TCMod -> StageTexture -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String->StageAttrs | StageAttrs | Type
364testdata/Material.lc 132:7-132:14 StageAttrs -> Maybe (Blending', Blending') 364testdata/Material.lc 132:7-132:14 StageAttrs -> Maybe (Blending', Blending')
365testdata/Material.lc 132:25-132:30 Type->Type 365testdata/Material.lc 132:25-132:30 Type->Type
366testdata/Material.lc 132:25-132:53 Type 366testdata/Material.lc 132:25-132:53 Type
@@ -419,7 +419,7 @@ testdata/Material.lc 160:27-160:29 String
419testdata/Material.lc 163:6-163:17 Type 419testdata/Material.lc 163:6-163:17 Type
420testdata/Material.lc 163:6-164:18 Type 420testdata/Material.lc 163:6-164:18 Type
421testdata/Material.lc 163:6-178:32 Type 421testdata/Material.lc 163:6-178:32 Type
422testdata/Material.lc 164:7-164:18 () -> () -> Bool -> Float -> Bool -> Bool -> CullType -> List Deform -> Bool -> Bool -> List StageAttrs -> Bool->CommonAttrs | CommonAttrs | Type | V1 422testdata/Material.lc 164:7-164:18 () -> () -> Bool -> Float -> Bool -> Bool -> CullType -> List Deform -> Bool -> Bool -> List StageAttrs -> Bool->CommonAttrs | CommonAttrs | Type
423testdata/Material.lc 165:7-165:17 CommonAttrs->() 423testdata/Material.lc 165:7-165:17 CommonAttrs->()
424testdata/Material.lc 165:28-165:30 Type 424testdata/Material.lc 165:28-165:30 Type
425testdata/Material.lc 166:7-166:17 CommonAttrs->() 425testdata/Material.lc 166:7-166:17 CommonAttrs->()
diff --git a/testdata/Prelude.out b/testdata/Prelude.out
index 89f6b9ac..a5c55c09 100644
--- a/testdata/Prelude.out
+++ b/testdata/Prelude.out
@@ -270,8 +270,6 @@ testdata/Prelude.lc 41:21-44:49 List V0 -> List V1 | V0->V1
270testdata/Prelude.lc 42:22-44:49 List V2 | List V2 -> List V2 | V1 -> List V2 -> List V2 270testdata/Prelude.lc 42:22-44:49 List V2 | List V2 -> List V2 | V1 -> List V2 -> List V2
271testdata/Prelude.lc 42:27-42:31 V6 271testdata/Prelude.lc 42:27-42:31 V6
272testdata/Prelude.lc 42:32-42:33 V5 272testdata/Prelude.lc 42:32-42:33 V5
273testdata/Prelude.lc 43:24-43:28 V1
274testdata/Prelude.lc 43:24-44:49 List V4
275testdata/Prelude.lc 43:32-44:49 Bool -> List V6 273testdata/Prelude.lc 43:32-44:49 Bool -> List V6
276testdata/Prelude.lc 43:33-43:34 V7 274testdata/Prelude.lc 43:33-43:34 V7
277testdata/Prelude.lc 43:33-43:36 List V6 -> List V7 275testdata/Prelude.lc 43:33-43:36 List V6 -> List V7
@@ -291,9 +289,7 @@ testdata/Prelude.lc 49:10-49:11 V1
291testdata/Prelude.lc 49:16-49:19 Type 289testdata/Prelude.lc 49:16-49:19 Type
292testdata/Prelude.lc 49:17-49:18 Type 290testdata/Prelude.lc 49:17-49:18 Type
293testdata/Prelude.lc 50:1-50:5 {a} -> List a -> List a 291testdata/Prelude.lc 50:1-50:5 {a} -> List a -> List a
294testdata/Prelude.lc 50:8-50:9 List V1 292testdata/Prelude.lc 50:16-50:18 List V0 -> List V1 | List V1 | List V2 -> V2 | List V3 | V1 -> List V2 -> V2
295testdata/Prelude.lc 50:8-50:18 List V0 -> List V1 | List V1
296testdata/Prelude.lc 50:16-50:18 List V2 -> V2 | List V3 | V1 -> List V2 -> V2
297testdata/Prelude.lc 52:10-52:13 Type 293testdata/Prelude.lc 52:10-52:13 Type
298testdata/Prelude.lc 52:10-52:25 Type 294testdata/Prelude.lc 52:10-52:25 Type
299testdata/Prelude.lc 52:11-52:12 V1 295testdata/Prelude.lc 52:11-52:12 V1
@@ -321,8 +317,6 @@ testdata/Prelude.lc 56:34-56:35 V13
321testdata/Prelude.lc 56:36-56:37 V10 317testdata/Prelude.lc 56:36-56:37 V10
322testdata/Prelude.lc 56:39-56:41 List V7 318testdata/Prelude.lc 56:39-56:41 List V7
323testdata/Prelude.lc 58:1-58:7 {a} -> (a -> a->a) -> List a -> a 319testdata/Prelude.lc 58:1-58:7 {a} -> (a -> a->a) -> List a -> a
324testdata/Prelude.lc 58:12-58:13 V2
325testdata/Prelude.lc 58:12-58:32 V0
326testdata/Prelude.lc 58:20-58:25 {a} -> {b} -> (b -> a->a) -> a -> List b -> a 320testdata/Prelude.lc 58:20-58:25 {a} -> {b} -> (b -> a->a) -> a -> List b -> a
327testdata/Prelude.lc 58:20-58:27 V1 -> List V1 -> V3 321testdata/Prelude.lc 58:20-58:27 V1 -> List V1 -> V3
328testdata/Prelude.lc 58:20-58:29 List V0 -> V5 322testdata/Prelude.lc 58:20-58:29 List V0 -> V5
@@ -349,17 +343,11 @@ testdata/Prelude.lc 61:41-61:43 HList V2 -> V2 | V2 | V2 -> HList V2 -> V2 | V5
349testdata/Prelude.lc 61:47-61:52 V8 343testdata/Prelude.lc 61:47-61:52 V8
350testdata/Prelude.lc 61:53-61:55 List V7 344testdata/Prelude.lc 61:53-61:55 List V7
351testdata/Prelude.lc 63:1-63:8 {a} -> (a -> a->Ordering) -> List a -> List a -> List a 345testdata/Prelude.lc 63:1-63:8 {a} -> (a -> a->Ordering) -> List a -> List a -> List a
352testdata/Prelude.lc 63:13-63:14 List V0
353testdata/Prelude.lc 63:13-67:21 List V0 | V0->V1
354testdata/Prelude.lc 63:20-63:21 List V2
355testdata/Prelude.lc 63:20-67:21 List V1 -> V4 | List V2 | V0 -> List V1 -> V4
356testdata/Prelude.lc 63:27-65:32 List V1 -> V9 | List V4 | V0 -> List V1 -> V9 346testdata/Prelude.lc 63:27-65:32 List V1 -> V9 | List V4 | V0 -> List V1 -> V9
357testdata/Prelude.lc 63:27-67:21 List V2 -> List V3 347testdata/Prelude.lc 63:27-67:21 List V1 -> V4 | List V2 | List V2 -> List V3 | V0 -> List V1 -> V4 | V0->V1
358testdata/Prelude.lc 63:32-63:33 V9 348testdata/Prelude.lc 63:32-63:33 V9
359testdata/Prelude.lc 63:34-63:35 V7 349testdata/Prelude.lc 63:34-63:35 V7
360testdata/Prelude.lc 63:36-63:37 V8 350testdata/Prelude.lc 63:36-63:37 V8
361testdata/Prelude.lc 64:5-64:7 V1
362testdata/Prelude.lc 64:5-65:32 List V5
363testdata/Prelude.lc 64:11-64:12 V9 351testdata/Prelude.lc 64:11-64:12 V9
364testdata/Prelude.lc 64:11-64:13 List V8 -> List V9 352testdata/Prelude.lc 64:11-64:13 List V8 -> List V9
365testdata/Prelude.lc 64:11-64:33 List V7 353testdata/Prelude.lc 64:11-64:33 List V7
@@ -438,14 +426,10 @@ testdata/Prelude.lc 76:1-76:4 {a} -> {b} -> (a, b)->a
438testdata/Prelude.lc 76:14-76:15 HList V2 -> V2 | V10 | V2 -> HList V2 -> V2 | V3 | V7 426testdata/Prelude.lc 76:14-76:15 HList V2 -> V2 | V10 | V2 -> HList V2 -> V2 | V3 | V7
439testdata/Prelude.lc 77:1-77:4 {a} -> {b} -> (a, b)->b 427testdata/Prelude.lc 77:1-77:4 {a} -> {b} -> (a, b)->b
440testdata/Prelude.lc 77:14-77:15 HList V2 -> V2 | V2 | V2 -> HList V2 -> V2 | V5 428testdata/Prelude.lc 77:14-77:15 HList V2 -> V2 | V2 | V2 -> HList V2 -> V2 | V5
441testdata/Prelude.lc 79:1-79:6 V2
442testdata/Prelude.lc 79:1-80:18 Bool
443testdata/Prelude.lc 79:7-79:10 Bool -> Bool->Bool 429testdata/Prelude.lc 79:7-79:10 Bool -> Bool->Bool
444testdata/Prelude.lc 79:15-79:16 V2 430testdata/Prelude.lc 79:15-79:16 V2
445testdata/Prelude.lc 79:15-80:18 Bool->Bool 431testdata/Prelude.lc 79:15-80:18 Bool->Bool
446testdata/Prelude.lc 80:14-80:18 Bool 432testdata/Prelude.lc 80:14-80:18 Bool
447testdata/Prelude.lc 84:1-84:5 V2
448testdata/Prelude.lc 84:1-85:20 Bool
449testdata/Prelude.lc 84:6-84:9 Bool -> Bool->Bool 433testdata/Prelude.lc 84:6-84:9 Bool -> Bool->Bool
450testdata/Prelude.lc 84:14-84:15 V1 434testdata/Prelude.lc 84:14-84:15 V1
451testdata/Prelude.lc 84:14-85:20 Bool->Bool 435testdata/Prelude.lc 84:14-85:20 Bool->Bool
@@ -457,8 +441,6 @@ testdata/Prelude.lc 122:16-122:23 RecItem | String -> Type->RecItem | Type
457testdata/Prelude.lc 122:24-122:30 Type 441testdata/Prelude.lc 122:24-122:30 Type
458testdata/Prelude.lc 122:31-122:35 Type 442testdata/Prelude.lc 122:31-122:35 Type
459testdata/Prelude.lc 124:1-124:12 RecItem->Type 443testdata/Prelude.lc 124:1-124:12 RecItem->Type
460testdata/Prelude.lc 124:14-124:21 V1
461testdata/Prelude.lc 124:14-124:30 Type
462testdata/Prelude.lc 124:29-124:30 String -> Type->V2 | Type | Type->V2 444testdata/Prelude.lc 124:29-124:30 String -> Type->V2 | Type | Type->V2
463testdata/Prelude.lc 126:6-126:13 List RecItem -> Type | Type 445testdata/Prelude.lc 126:6-126:13 List RecItem -> Type | Type
464testdata/Prelude.lc 126:6-127:17 Type 446testdata/Prelude.lc 126:6-127:17 Type
@@ -495,12 +477,8 @@ testdata/Prelude.lc 130:69-130:70 String
495testdata/Prelude.lc 130:71-130:72 Type 477testdata/Prelude.lc 130:71-130:72 Type
496testdata/Prelude.lc 130:73-130:75 List V8 478testdata/Prelude.lc 130:73-130:75 List V8
497testdata/Prelude.lc 132:1-132:7 {a} -> {b : List Type} -> HList ('Cons a b) -> a 479testdata/Prelude.lc 132:1-132:7 {a} -> {b : List Type} -> HList ('Cons a b) -> a
498testdata/Prelude.lc 132:9-132:14 V3
499testdata/Prelude.lc 132:9-132:23 V1
500testdata/Prelude.lc 132:22-132:23 HList V2 -> V2 | V2 -> HList V2 -> V2 | V4 480testdata/Prelude.lc 132:22-132:23 HList V2 -> V2 | V2 -> HList V2 -> V2 | V4
501testdata/Prelude.lc 133:1-133:7 {a} -> {b : List Type} -> HList ('Cons a b) -> HList b 481testdata/Prelude.lc 133:1-133:7 {a} -> {b : List Type} -> HList ('Cons a b) -> HList b
502testdata/Prelude.lc 133:9-133:14 V3
503testdata/Prelude.lc 133:9-133:23 HList V0
504testdata/Prelude.lc 133:22-133:23 HList V2 -> V2 | HList V3 | V2 -> HList V2 -> V2 482testdata/Prelude.lc 133:22-133:23 HList V2 -> V2 | HList V3 | V2 -> HList V2 -> V2
505testdata/Prelude.lc 136:12-138:181 V0->V1 | {a} -> {b : List RecItem} -> c:String -> {d : 'isKeyC c a b} -> RecordC b -> a 483testdata/Prelude.lc 136:12-138:181 V0->V1 | {a} -> {b : List RecItem} -> c:String -> {d : 'isKeyC c a b} -> RecordC b -> a
506testdata/Prelude.lc 136:28-136:37 Type 484testdata/Prelude.lc 136:28-136:37 Type
@@ -522,14 +500,10 @@ testdata/Prelude.lc 136:82-136:97 Type
522testdata/Prelude.lc 136:90-136:92 List RecItem 500testdata/Prelude.lc 136:90-136:92 List RecItem
523testdata/Prelude.lc 136:96-136:97 Type 501testdata/Prelude.lc 136:96-136:97 Type
524testdata/Prelude.lc 137:1-137:8 {a} -> {b : List RecItem} -> c:String -> {d : 'isKeyC c a b} -> RecordC b -> a 502testdata/Prelude.lc 137:1-137:8 {a} -> {b : List RecItem} -> c:String -> {d : 'isKeyC c a b} -> RecordC b -> a
525testdata/Prelude.lc 137:28-137:29 List RecItem
526testdata/Prelude.lc 137:28-138:181 RecordC V2 -> V4 | V4 | a:String -> {b : 'isKeyC a V2 V1} -> RecordC V2 -> V4 | {a : 'isKeyC V0 V2 V1} -> RecordC V2 -> V4 | {a : List RecItem} -> b:String -> {c : 'isKeyC b V2 a} -> RecordC a -> V4 | {a} -> {b : List RecItem} -> c:String -> {d : 'isKeyC c a b} -> RecordC b -> a
527testdata/Prelude.lc 137:40-137:50 RecordC V9
528testdata/Prelude.lc 137:40-138:181 List V2 -> V2 | String -> Type->V2 | Type->V2 | V1 -> List V2 -> V2 | V6 | V9
529testdata/Prelude.lc 137:57-137:58 String 503testdata/Prelude.lc 137:57-137:58 String
530testdata/Prelude.lc 137:57-137:61 String->Bool 504testdata/Prelude.lc 137:57-137:61 String->Bool
531testdata/Prelude.lc 137:57-137:64 Bool 505testdata/Prelude.lc 137:57-137:64 Bool
532testdata/Prelude.lc 137:57-138:181 HList ('map RecItem Type 'recItemType V1) -> V1 | V12 506testdata/Prelude.lc 137:57-138:181 HList ('map RecItem Type 'recItemType V1) -> V1 | List V2 -> V2 | RecordC V2 -> V4 | String -> Type->V2 | Type->V2 | V1 -> List V2 -> V2 | V12 | V4 | V6 | V9 | a:String -> {b : 'isKeyC a V2 V1} -> RecordC V2 -> V4 | {a : 'isKeyC V0 V2 V1} -> RecordC V2 -> V4 | {a : List RecItem} -> b:String -> {c : 'isKeyC b V2 a} -> RecordC a -> V4 | {a} -> {b : List RecItem} -> c:String -> {d : 'isKeyC c a b} -> RecordC b -> a
533testdata/Prelude.lc 137:59-137:61 {a} -> {b : Eq a} -> a -> a->Bool 507testdata/Prelude.lc 137:59-137:61 {a} -> {b : Eq a} -> a -> a->Bool
534testdata/Prelude.lc 137:62-137:64 String 508testdata/Prelude.lc 137:62-137:64 String
535testdata/Prelude.lc 137:67-137:73 {a} -> {b : List Type} -> HList ('Cons a b) -> a 509testdata/Prelude.lc 137:67-137:73 {a} -> {b : List Type} -> HList ('Cons a b) -> a
@@ -1595,11 +1569,9 @@ testdata/Prelude.lc 387:10-387:11 V1
1595testdata/Prelude.lc 387:16-387:19 Type 1569testdata/Prelude.lc 387:16-387:19 Type
1596testdata/Prelude.lc 387:16-387:24 Type 1570testdata/Prelude.lc 387:16-387:24 Type
1597testdata/Prelude.lc 387:23-387:24 Type 1571testdata/Prelude.lc 387:23-387:24 Type
1598testdata/Prelude.lc 388:4-388:5 List V2
1599testdata/Prelude.lc 388:4-389:30 Int->V2 | List V0 -> Int->V2 | V2
1600testdata/Prelude.lc 388:10-388:12 {a} -> List a -> Int->a 1572testdata/Prelude.lc 388:10-388:12 {a} -> List a -> Int->a
1601testdata/Prelude.lc 388:19-388:20 V3 1573testdata/Prelude.lc 388:19-388:20 V3
1602testdata/Prelude.lc 388:19-389:30 Bool->V4 | List V2 -> V2 | V1 -> List V2 -> V2 | V2 1574testdata/Prelude.lc 388:19-389:30 Bool->V4 | Int->V2 | List V0 -> Int->V2 | List V2 -> V2 | V1 -> List V2 -> V2 | V2
1603testdata/Prelude.lc 389:19-389:21 List V5 1575testdata/Prelude.lc 389:19-389:21 List V5
1604testdata/Prelude.lc 389:19-389:24 Int->V5 1576testdata/Prelude.lc 389:19-389:24 Int->V5
1605testdata/Prelude.lc 389:19-389:30 V3 1577testdata/Prelude.lc 389:19-389:30 V3
diff --git a/testdata/complex.out b/testdata/complex.out
index 16af3496..4fcc18c8 100644
--- a/testdata/complex.out
+++ b/testdata/complex.out
@@ -77,13 +77,9 @@ testdata/complex.lc 18:20-18:38 Type
77testdata/complex.lc 18:28-18:29 V1 77testdata/complex.lc 18:28-18:29 V1
78testdata/complex.lc 18:33-18:38 Type 78testdata/complex.lc 18:33-18:38 Type
79testdata/complex.lc 19:1-19:5 {a:Repr} -> Complex a -> Float 79testdata/complex.lc 19:1-19:5 {a:Repr} -> Complex a -> Float
80testdata/complex.lc 19:7-19:14 Repr
81testdata/complex.lc 19:7-20:35 Complex V0 -> Float | Float | {a:Repr} -> Complex a -> Float
82testdata/complex.lc 19:16-19:23 Complex V3
83testdata/complex.lc 19:16-19:50 Float
84testdata/complex.lc 19:16-20:35 Repr->Float
85testdata/complex.lc 19:34-19:38 {a} -> {b:Nat} -> {c : a ~ VecScalar b Float} -> a->a 80testdata/complex.lc 19:34-19:38 {a} -> {b:Nat} -> {c : a ~ VecScalar b Float} -> a->a
86testdata/complex.lc 19:34-19:50 Float -> Float->V3 | Float->V3 | VecScalar 1 Float 81testdata/complex.lc 19:34-19:50 Float | Float -> Float->V3 | Float->V3 | VecScalar 1 Float
82testdata/complex.lc 19:34-20:35 Complex V0 -> Float | Float | Repr->Float | {a:Repr} -> Complex a -> Float
87testdata/complex.lc 19:40-19:41 Float 83testdata/complex.lc 19:40-19:41 Float
88testdata/complex.lc 19:40-19:42 Float->Float 84testdata/complex.lc 19:40-19:42 Float->Float
89testdata/complex.lc 19:40-19:43 Float 85testdata/complex.lc 19:40-19:43 Float
@@ -97,8 +93,6 @@ testdata/complex.lc 19:46-19:48 Float->Float
97testdata/complex.lc 19:46-19:49 Float 93testdata/complex.lc 19:46-19:49 Float
98testdata/complex.lc 19:47-19:48 {a} -> {b : Num (MatVecScalarElem a)} -> a -> a->a 94testdata/complex.lc 19:47-19:48 {a} -> {b : Num (MatVecScalarElem a)} -> a -> a->a
99testdata/complex.lc 19:48-19:49 Float 95testdata/complex.lc 19:48-19:49 Float
100testdata/complex.lc 20:16-20:23 Complex V2
101testdata/complex.lc 20:16-20:35 Float
102testdata/complex.lc 20:34-20:35 Float | Float -> Float->V3 | Float->V3 96testdata/complex.lc 20:34-20:35 Float | Float -> Float->V3 | Float->V3
103testdata/complex.lc 22:12-22:19 Repr->Type 97testdata/complex.lc 22:12-22:19 Repr->Type
104testdata/complex.lc 22:12-22:26 Type 98testdata/complex.lc 22:12-22:26 Type
@@ -107,10 +101,8 @@ testdata/complex.lc 22:30-22:37 Repr->Type
107testdata/complex.lc 22:30-22:43 Type 101testdata/complex.lc 22:30-22:43 Type
108testdata/complex.lc 22:38-22:43 Repr 102testdata/complex.lc 22:38-22:43 Repr
109testdata/complex.lc 23:1-23:8 Complex 'Normal -> Complex 'Polar 103testdata/complex.lc 23:1-23:8 Complex 'Normal -> Complex 'Polar
110testdata/complex.lc 23:10-23:17 Complex 'Normal
111testdata/complex.lc 23:10-31:25 Complex 'Normal -> Complex 'Polar | Complex 'Polar
112testdata/complex.lc 24:8-29:17 Complex 'Polar 104testdata/complex.lc 24:8-29:17 Complex 'Polar
113testdata/complex.lc 24:8-31:25 Float -> Float->V3 | Float->V3 105testdata/complex.lc 24:8-31:25 Complex 'Normal -> Complex 'Polar | Complex 'Polar | Float -> Float->V3 | Float->V3
114testdata/complex.lc 24:11-24:12 Float 106testdata/complex.lc 24:11-24:12 Float
115testdata/complex.lc 24:11-24:14 VecScalar 1 Float -> VecScalar 1 Bool 107testdata/complex.lc 24:11-24:14 VecScalar 1 Float -> VecScalar 1 Bool
116testdata/complex.lc 24:11-24:19 VecScalar 1 Bool 108testdata/complex.lc 24:11-24:19 VecScalar 1 Bool
@@ -261,11 +253,9 @@ testdata/complex.lc 64:30-64:37 Repr->Type
261testdata/complex.lc 64:30-64:44 Type 253testdata/complex.lc 64:30-64:44 Type
262testdata/complex.lc 64:38-64:44 Repr 254testdata/complex.lc 64:38-64:44 Repr
263testdata/complex.lc 65:1-65:9 Complex 'Polar -> Complex 'Normal 255testdata/complex.lc 65:1-65:9 Complex 'Polar -> Complex 'Normal
264testdata/complex.lc 65:11-65:18 Complex 'Polar
265testdata/complex.lc 65:11-65:63 Complex 'Polar -> Complex 'Normal | Complex V0
266testdata/complex.lc 65:28-65:35 {a:Repr} -> Float -> Float -> Complex a 256testdata/complex.lc 65:28-65:35 {a:Repr} -> Float -> Float -> Complex a
267testdata/complex.lc 65:28-65:49 Float -> Complex V1 257testdata/complex.lc 65:28-65:49 Float -> Complex V1
268testdata/complex.lc 65:28-65:63 Complex V0 | Float -> Float->V3 | Float->V3 258testdata/complex.lc 65:28-65:63 Complex 'Polar -> Complex 'Normal | Complex V0 | Float -> Float->V3 | Float->V3
269testdata/complex.lc 65:37-65:38 Float 259testdata/complex.lc 65:37-65:38 Float
270testdata/complex.lc 65:37-65:40 Float->Float 260testdata/complex.lc 65:37-65:40 Float->Float
271testdata/complex.lc 65:37-65:48 Float 261testdata/complex.lc 65:37-65:48 Float
@@ -281,8 +271,6 @@ testdata/complex.lc 65:55-65:58 {a} -> {b:Nat} -> {c : a ~ VecScalar b Float} -
281testdata/complex.lc 65:55-65:62 VecScalar 1 Float 271testdata/complex.lc 65:55-65:62 VecScalar 1 Float
282testdata/complex.lc 65:59-65:62 Float 272testdata/complex.lc 65:59-65:62 Float
283testdata/complex.lc 111:1-111:15 {a:Repr} -> Complex a -> Float 273testdata/complex.lc 111:1-111:15 {a:Repr} -> Complex a -> Float
284testdata/complex.lc 111:17-111:24 V2
285testdata/complex.lc 111:17-111:39 Float
286testdata/complex.lc 111:38-111:39 Float | Float -> Float->V3 | Float->V3 274testdata/complex.lc 111:38-111:39 Float | Float -> Float->V3 | Float->V3
287testdata/complex.lc 113:20-113:70 Type 275testdata/complex.lc 113:20-113:70 Type
288testdata/complex.lc 113:32-113:39 Repr->Type 276testdata/complex.lc 113:32-113:39 Repr->Type
@@ -297,17 +285,9 @@ testdata/complex.lc 113:60-113:67 Repr->Type
297testdata/complex.lc 113:60-113:70 Type 285testdata/complex.lc 113:60-113:70 Type
298testdata/complex.lc 113:68-113:70 Repr 286testdata/complex.lc 113:68-113:70 Repr
299testdata/complex.lc 114:1-114:4 {a:Repr} -> {b:Repr} -> Complex a -> Complex b -> Complex a 287testdata/complex.lc 114:1-114:4 {a:Repr} -> {b:Repr} -> Complex a -> Complex b -> Complex a
300testdata/complex.lc 114:6-114:13 Repr
301testdata/complex.lc 114:6-114:76 Complex V1 -> Complex V1 -> Complex V3 | Complex V1 -> Complex V3 | Complex V3 | {a:Repr} -> Complex V1 -> Complex a -> Complex V3 | {a:Repr} -> {b:Repr} -> Complex a -> Complex b -> Complex a
302testdata/complex.lc 114:15-114:22 Repr
303testdata/complex.lc 114:15-114:76 Complex V0
304testdata/complex.lc 114:24-114:31 Complex V7
305testdata/complex.lc 114:24-114:76 Complex V0
306testdata/complex.lc 114:38-114:45 Complex V10
307testdata/complex.lc 114:38-114:76 Complex V0 | Float -> Float->V3 | Float->V3
308testdata/complex.lc 114:53-114:60 {a:Repr} -> Float -> Float -> Complex a 288testdata/complex.lc 114:53-114:60 {a:Repr} -> Float -> Float -> Complex a
309testdata/complex.lc 114:53-114:68 Float -> Complex V1 289testdata/complex.lc 114:53-114:68 Float -> Complex V1
310testdata/complex.lc 114:53-114:76 Complex V0 | Float -> Float->V3 | Float->V3 290testdata/complex.lc 114:53-114:76 Complex V0 | Complex V1 -> Complex V1 -> Complex V3 | Complex V1 -> Complex V3 | Complex V3 | Float -> Float->V3 | Float->V3 | {a:Repr} -> Complex V1 -> Complex a -> Complex V3 | {a:Repr} -> {b:Repr} -> Complex a -> Complex b -> Complex a
311testdata/complex.lc 114:62-114:63 Float 291testdata/complex.lc 114:62-114:63 Float
312testdata/complex.lc 114:62-114:65 Float->Float 292testdata/complex.lc 114:62-114:65 Float->Float
313testdata/complex.lc 114:62-114:67 Float 293testdata/complex.lc 114:62-114:67 Float
@@ -330,17 +310,9 @@ testdata/complex.lc 128:51-128:58 Repr->Type
330testdata/complex.lc 128:51-128:61 Type 310testdata/complex.lc 128:51-128:61 Type
331testdata/complex.lc 128:59-128:61 Repr 311testdata/complex.lc 128:59-128:61 Repr
332testdata/complex.lc 129:1-129:4 {a:Repr} -> {b:Repr} -> Complex a -> Complex b -> Complex a 312testdata/complex.lc 129:1-129:4 {a:Repr} -> {b:Repr} -> Complex a -> Complex b -> Complex a
333testdata/complex.lc 129:6-129:13 Repr
334testdata/complex.lc 129:6-129:84 Complex V1 -> Complex V1 -> Complex V3 | Complex V1 -> Complex V3 | Complex V3 | {a:Repr} -> Complex V1 -> Complex a -> Complex V3 | {a:Repr} -> {b:Repr} -> Complex a -> Complex b -> Complex a
335testdata/complex.lc 129:15-129:22 Repr
336testdata/complex.lc 129:15-129:84 Complex V0
337testdata/complex.lc 129:24-129:31 Complex V7
338testdata/complex.lc 129:24-129:84 Complex V0
339testdata/complex.lc 129:38-129:45 Complex V10
340testdata/complex.lc 129:38-129:84 Complex V0 | Float -> Float->V3 | Float->V3
341testdata/complex.lc 129:53-129:60 {a:Repr} -> Float -> Float -> Complex a 313testdata/complex.lc 129:53-129:60 {a:Repr} -> Float -> Float -> Complex a
342testdata/complex.lc 129:53-129:72 Float -> Complex V1 314testdata/complex.lc 129:53-129:72 Float -> Complex V1
343testdata/complex.lc 129:53-129:84 Complex V0 | Float -> Float->V3 | Float->V3 315testdata/complex.lc 129:53-129:84 Complex V0 | Complex V1 -> Complex V1 -> Complex V3 | Complex V1 -> Complex V3 | Complex V3 | Float -> Float->V3 | Float->V3 | {a:Repr} -> Complex V1 -> Complex a -> Complex V3 | {a:Repr} -> {b:Repr} -> Complex a -> Complex b -> Complex a
344testdata/complex.lc 129:62-129:63 Float 316testdata/complex.lc 129:62-129:63 Float
345testdata/complex.lc 129:62-129:64 Float->Float 317testdata/complex.lc 129:62-129:64 Float->Float
346testdata/complex.lc 129:62-129:65 Float 318testdata/complex.lc 129:62-129:65 Float
diff --git a/testdata/data.out b/testdata/data.out
index 235e193c..5ad6b9d7 100644
--- a/testdata/data.out
+++ b/testdata/data.out
@@ -42,7 +42,7 @@ testdata/data.lc 5:6-6:39 Type
42testdata/data.lc 5:6-8:20 Type 42testdata/data.lc 5:6-8:20 Type
43testdata/data.lc 5:14-5:20 Data2 | Int->Data2 | Type 43testdata/data.lc 5:14-5:20 Data2 | Int->Data2 | Type
44testdata/data.lc 5:21-5:24 Type 44testdata/data.lc 5:21-5:24 Type
45testdata/data.lc 6:14-6:20 Data2 | Int -> Int->Data2 | Type | V1 45testdata/data.lc 6:14-6:20 Data2 | Int -> Int->Data2 | Type
46testdata/data.lc 6:23-6:24 Data2->Int 46testdata/data.lc 6:23-6:24 Data2->Int
47testdata/data.lc 6:28-6:31 Type 47testdata/data.lc 6:28-6:31 Type
48testdata/data.lc 6:33-6:34 Data2->Int 48testdata/data.lc 6:33-6:34 Data2->Int
@@ -55,10 +55,10 @@ testdata/data.lc 10:6-10:38 Type
55testdata/data.lc 10:6-11:54 Type 55testdata/data.lc 10:6-11:54 Type
56testdata/data.lc 10:6-12:29 Type 56testdata/data.lc 10:6-12:29 Type
57testdata/data.lc 10:6-12:48 Type 57testdata/data.lc 10:6-12:48 Type
58testdata/data.lc 10:23-10:29 Data5 V4 V3 V2 | Type | V4 | {a} -> {b} -> {c} -> a -> Data5 a b c 58testdata/data.lc 10:23-10:29 Data5 V4 V3 V2 | Type | {a} -> {b} -> {c} -> a -> Data5 a b c
59testdata/data.lc 10:32-10:34 {a} -> {b} -> {c} -> Data5 a b c -> a 59testdata/data.lc 10:32-10:34 {a} -> {b} -> {c} -> Data5 a b c -> a
60testdata/data.lc 10:36-10:38 Type 60testdata/data.lc 10:36-10:38 Type
61testdata/data.lc 11:23-11:29 Data5 V7 V6 V5 | Type | V4 | {a} -> {b} -> {c} -> a -> b -> c -> Data5 a b c 61testdata/data.lc 11:23-11:29 Data5 V7 V6 V5 | Type | {a} -> {b} -> {c} -> a -> b -> c -> Data5 a b c
62testdata/data.lc 11:36-11:38 Type 62testdata/data.lc 11:36-11:38 Type
63testdata/data.lc 11:40-11:42 {a} -> {b} -> {c} -> Data5 a b c -> b 63testdata/data.lc 11:40-11:42 {a} -> {b} -> {c} -> Data5 a b c -> b
64testdata/data.lc 11:44-11:46 Type 64testdata/data.lc 11:44-11:46 Type
diff --git a/testdata/performance/Material.out b/testdata/performance/Material.out
index b67330c2..e7de752a 100644
--- a/testdata/performance/Material.out
+++ b/testdata/performance/Material.out
@@ -163,7 +163,7 @@ testdata/performance/Material.lc 8:17-8:18 V1
163testdata/performance/Material.lc 10:6-10:12 Type 163testdata/performance/Material.lc 10:6-10:12 Type
164testdata/performance/Material.lc 10:6-11:13 Type 164testdata/performance/Material.lc 10:6-11:13 Type
165testdata/performance/Material.lc 10:6-15:39 Type 165testdata/performance/Material.lc 10:6-15:39 Type
166testdata/performance/Material.lc 11:7-11:13 Entity | Type | V1 | Vec 4 Float -> Vec 4 Float -> Vec 3 Float -> Vec 4 Float -> Entity 166testdata/performance/Material.lc 11:7-11:13 Entity | Type | Vec 4 Float -> Vec 4 Float -> Vec 3 Float -> Vec 4 Float -> Entity
167testdata/performance/Material.lc 12:7-12:20 Entity -> VecS Float 4 167testdata/performance/Material.lc 12:7-12:20 Entity -> VecS Float 4
168testdata/performance/Material.lc 12:28-12:31 Nat -> Type->Type 168testdata/performance/Material.lc 12:28-12:31 Nat -> Type->Type
169testdata/performance/Material.lc 12:28-12:33 Type->Type 169testdata/performance/Material.lc 12:28-12:33 Type->Type
@@ -360,7 +360,7 @@ testdata/performance/Material.lc 127:7-127:15 DepthFunction
360testdata/performance/Material.lc 130:6-130:16 Type 360testdata/performance/Material.lc 130:6-130:16 Type
361testdata/performance/Material.lc 130:6-131:17 Type 361testdata/performance/Material.lc 130:6-131:17 Type
362testdata/performance/Material.lc 130:6-144:34 Type 362testdata/performance/Material.lc 130:6-144:34 Type
363testdata/performance/Material.lc 131:7-131:17 Maybe (Blending', Blending') -> RGBGen -> AlphaGen -> TCGen -> List TCMod -> StageTexture -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String->StageAttrs | StageAttrs | Type | V1 363testdata/performance/Material.lc 131:7-131:17 Maybe (Blending', Blending') -> RGBGen -> AlphaGen -> TCGen -> List TCMod -> StageTexture -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String->StageAttrs | StageAttrs | Type
364testdata/performance/Material.lc 132:7-132:14 StageAttrs -> Maybe (Blending', Blending') 364testdata/performance/Material.lc 132:7-132:14 StageAttrs -> Maybe (Blending', Blending')
365testdata/performance/Material.lc 132:25-132:30 Type->Type 365testdata/performance/Material.lc 132:25-132:30 Type->Type
366testdata/performance/Material.lc 132:25-132:53 Type 366testdata/performance/Material.lc 132:25-132:53 Type
@@ -419,7 +419,7 @@ testdata/performance/Material.lc 160:27-160:29 String
419testdata/performance/Material.lc 163:6-163:17 Type 419testdata/performance/Material.lc 163:6-163:17 Type
420testdata/performance/Material.lc 163:6-164:18 Type 420testdata/performance/Material.lc 163:6-164:18 Type
421testdata/performance/Material.lc 163:6-178:32 Type 421testdata/performance/Material.lc 163:6-178:32 Type
422testdata/performance/Material.lc 164:7-164:18 () -> () -> Bool -> Float -> Bool -> Bool -> CullType -> List Deform -> Bool -> Bool -> List StageAttrs -> Bool->CommonAttrs | CommonAttrs | Type | V1 422testdata/performance/Material.lc 164:7-164:18 () -> () -> Bool -> Float -> Bool -> Bool -> CullType -> List Deform -> Bool -> Bool -> List StageAttrs -> Bool->CommonAttrs | CommonAttrs | Type
423testdata/performance/Material.lc 165:7-165:17 CommonAttrs->() 423testdata/performance/Material.lc 165:7-165:17 CommonAttrs->()
424testdata/performance/Material.lc 165:28-165:30 Type 424testdata/performance/Material.lc 165:28-165:30 Type
425testdata/performance/Material.lc 166:7-166:17 CommonAttrs->() 425testdata/performance/Material.lc 166:7-166:17 CommonAttrs->()
diff --git a/testdata/typeclass.out b/testdata/typeclass.out
index 63f5f771..8eb6907a 100644
--- a/testdata/typeclass.out
+++ b/testdata/typeclass.out
@@ -8,19 +8,13 @@ not :: 'Bool->'Bool
8/= :: {a} -> {b : 'Eq a} -> a -> a->'Bool 8/= :: {a} -> {b : 'Eq a} -> a -> a->'Bool
9------------ tooltips 9------------ tooltips
10testdata/typeclass.lc 8:1-8:4 Bool->Bool 10testdata/typeclass.lc 8:1-8:4 Bool->Bool
11testdata/typeclass.lc 8:5-8:9 V1
12testdata/typeclass.lc 8:5-9:17 Bool
13testdata/typeclass.lc 8:12-8:17 Bool 11testdata/typeclass.lc 8:12-8:17 Bool
14testdata/typeclass.lc 8:12-9:17 Bool->Bool 12testdata/typeclass.lc 8:12-9:17 Bool->Bool
15testdata/typeclass.lc 9:13-9:17 Bool 13testdata/typeclass.lc 9:13-9:17 Bool
16testdata/typeclass.lc 11:1-11:5 V2
17testdata/typeclass.lc 11:1-12:19 Bool
18testdata/typeclass.lc 11:6-11:8 Bool -> Bool->Bool 14testdata/typeclass.lc 11:6-11:8 Bool -> Bool->Bool
19testdata/typeclass.lc 11:13-11:14 V1 15testdata/typeclass.lc 11:13-11:14 V1
20testdata/typeclass.lc 11:13-12:19 Bool->Bool 16testdata/typeclass.lc 11:13-12:19 Bool->Bool
21testdata/typeclass.lc 12:14-12:19 Bool 17testdata/typeclass.lc 12:14-12:19 Bool
22testdata/typeclass.lc 14:1-14:6 V2
23testdata/typeclass.lc 14:1-15:17 Bool
24testdata/typeclass.lc 14:7-14:9 Bool -> Bool->Bool 18testdata/typeclass.lc 14:7-14:9 Bool -> Bool->Bool
25testdata/typeclass.lc 14:14-14:15 V2 19testdata/typeclass.lc 14:14-14:15 V2
26testdata/typeclass.lc 14:14-15:17 Bool->Bool 20testdata/typeclass.lc 14:14-15:17 Bool->Bool
@@ -41,12 +35,8 @@ testdata/typeclass.lc 20:15-20:19 V4->Bool
41testdata/typeclass.lc 20:15-20:21 Bool 35testdata/typeclass.lc 20:15-20:21 Bool
42testdata/typeclass.lc 20:17-20:19 {a} -> {b : Eq a} -> a -> a->Bool 36testdata/typeclass.lc 20:17-20:19 {a} -> {b : Eq a} -> a -> a->Bool
43testdata/typeclass.lc 20:20-20:21 V2 37testdata/typeclass.lc 20:20-20:21 V2
44testdata/typeclass.lc 22:13-22:17 Type | Type->Type
45testdata/typeclass.lc 22:13-24:23 (V1 -> V2->Bool) -> V2 -> V3->Bool | {a : Eq V0} -> V1 -> V2->Bool | {a} -> {b : Eq a} -> a -> a->Bool
46testdata/typeclass.lc 23:5-23:9 V2
47testdata/typeclass.lc 23:5-24:23 Bool
48testdata/typeclass.lc 23:17-23:18 Bool 38testdata/typeclass.lc 23:17-23:18 Bool
49testdata/typeclass.lc 23:17-24:23 Bool->Bool 39testdata/typeclass.lc 23:17-24:23 Bool->Bool | {a : Eq V0} -> V1 -> V2->Bool | {a} -> {b : Eq a} -> a -> a->Bool
50testdata/typeclass.lc 24:18-24:21 Bool->Bool 40testdata/typeclass.lc 24:18-24:21 Bool->Bool
51testdata/typeclass.lc 24:18-24:23 Bool 41testdata/typeclass.lc 24:18-24:23 Bool
52testdata/typeclass.lc 24:22-24:23 V1 42testdata/typeclass.lc 24:22-24:23 V1