diff options
-rw-r--r-- | TODO | 7 | ||||
-rw-r--r-- | lc/Builtins.lc | 6 | ||||
-rw-r--r-- | src/LambdaCube/Compiler/CoreToIR.hs | 3 | ||||
-rw-r--r-- | src/LambdaCube/Compiler/Infer.hs | 126 | ||||
-rw-r--r-- | testdata/Builtins.out | 126 | ||||
-rw-r--r-- | testdata/Prelude.out | 36 | ||||
-rw-r--r-- | testdata/complex.out | 16 |
7 files changed, 169 insertions, 151 deletions
@@ -69,6 +69,11 @@ done: | |||
69 | 69 | ||
70 | 0.5 goal: improvement + linear time interpretation | 70 | 0.5 goal: improvement + linear time interpretation |
71 | 71 | ||
72 | done: | ||
73 | - compiler: (~) :: forall a . a -> a -> Type | ||
74 | |||
75 | next: | ||
76 | |||
72 | - blog about release: | 77 | - blog about release: |
73 | - few sentences about the past events | 78 | - few sentences about the past events |
74 | - this is the 2nd version (first rewrite) of the DSL using the learnings from the first one | 79 | - this is the 2nd version (first rewrite) of the DSL using the learnings from the first one |
@@ -89,7 +94,6 @@ done: | |||
89 | - docs: feature teaser, 2 min paper videos | 94 | - docs: feature teaser, 2 min paper videos |
90 | - testenv: performance benchmarks | 95 | - testenv: performance benchmarks |
91 | 96 | ||
92 | - compiler: (~) :: forall a b . a -> b -> Type | ||
93 | - compiler: ConName --> Int | 97 | - compiler: ConName --> Int |
94 | - compiler: support let labels | 98 | - compiler: support let labels |
95 | - compiler optimization: irrelevance + erasure | 99 | - compiler optimization: irrelevance + erasure |
@@ -159,6 +163,7 @@ extra (refactoring): | |||
159 | - community: blog about compiler internals | 163 | - community: blog about compiler internals |
160 | - backend: generated backends | 164 | - backend: generated backends |
161 | - user supplied cpu values like color values and rendering context | 165 | - user supplied cpu values like color values and rendering context |
166 | - compiler: (~) :: forall a b . a -> b -> Type ? | ||
162 | - compiler: add more structure to witnesses? | 167 | - compiler: add more structure to witnesses? |
163 | - review all old disabled test cases | 168 | - review all old disabled test cases |
164 | - 100% test coverage of the parser | 169 | - 100% test coverage of the parser |
diff --git a/lc/Builtins.lc b/lc/Builtins.lc index 77027a39..d4226f25 100644 --- a/lc/Builtins.lc +++ b/lc/Builtins.lc | |||
@@ -462,7 +462,7 @@ PrimBShiftL, PrimBShiftR :: (Integral t, a ~ VecScalar d t, b ~ VecScalar d | |||
462 | PrimBShiftLS, PrimBShiftRS :: (Integral t, a ~ VecScalar d t) => a -> Word -> a | 462 | PrimBShiftLS, PrimBShiftRS :: (Integral t, a ~ VecScalar d t) => a -> Word -> a |
463 | -- Logic Functions | 463 | -- Logic Functions |
464 | PrimAnd, PrimOr, PrimXor :: Bool -> Bool -> Bool | 464 | PrimAnd, PrimOr, PrimXor :: Bool -> Bool -> Bool |
465 | PrimNot :: (a ~ VecScalar d Bool) => a -> a | 465 | PrimNot :: forall a d . (a ~ VecScalar d Bool) => a -> a |
466 | PrimAny, PrimAll :: VecScalar d Bool -> Bool | 466 | PrimAny, PrimAll :: VecScalar d Bool -> Bool |
467 | 467 | ||
468 | -- Angle, Trigonometry and Exponential Functions | 468 | -- Angle, Trigonometry and Exponential Functions |
@@ -509,8 +509,8 @@ PrimMulVecMat :: Vec h a -> Mat h w a -> Vec w a | |||
509 | PrimMulMatMat :: Mat i j a -> Mat j k a -> Mat i k a | 509 | PrimMulMatMat :: Mat i j a -> Mat j k a -> Mat i k a |
510 | -- Vector and Scalar Relational Functions | 510 | -- Vector and Scalar Relational Functions |
511 | PrimLessThan, PrimLessThanEqual, PrimGreaterThan, PrimGreaterThanEqual, PrimEqualV, PrimNotEqualV | 511 | PrimLessThan, PrimLessThanEqual, PrimGreaterThan, PrimGreaterThanEqual, PrimEqualV, PrimNotEqualV |
512 | :: (Num t, a ~ VecScalar d t, b ~ VecScalar d Bool) => a -> a -> b | 512 | :: forall a d t b . (Num t, a ~ VecScalar d t, b ~ VecScalar d Bool) => a -> a -> b |
513 | PrimEqual, PrimNotEqual :: (t ~ MatVecScalarElem a) => a -> a -> Bool | 513 | PrimEqual, PrimNotEqual :: forall a t . (t ~ MatVecScalarElem a) => a -> a -> Bool |
514 | -- Fragment Processing Functions | 514 | -- Fragment Processing Functions |
515 | PrimDFdx, PrimDFdy, PrimFWidth | 515 | PrimDFdx, PrimDFdy, PrimFWidth |
516 | :: (a ~ VecScalar d Float) => a -> a | 516 | :: (a ~ VecScalar d Float) => a -> a |
diff --git a/src/LambdaCube/Compiler/CoreToIR.hs b/src/LambdaCube/Compiler/CoreToIR.hs index 293b1bc9..04ce6ed1 100644 --- a/src/LambdaCube/Compiler/CoreToIR.hs +++ b/src/LambdaCube/Compiler/CoreToIR.hs | |||
@@ -892,7 +892,8 @@ toExp = flip runReader [] . flip evalStateT freshTypeVars . f_ | |||
892 | I.Pi b x yt -> newName >>= \n -> do | 892 | I.Pi b x yt -> newName >>= \n -> do |
893 | t <- f_ (x, I.TType) | 893 | t <- f_ (x, I.TType) |
894 | Lam b (PVar t n) t <$> local ((Var n t, x):) (f_ (y, yt)) | 894 | Lam b (PVar t n) t <$> local ((Var n t, x):) (f_ (y, yt)) |
895 | I.Con s n xs -> Con (show s) <$> f_ (I.nType s, I.TType) <*> chain [] (I.nType s) (I.mkConPars n et ++ xs) | 895 | I.Con s n xs -> Con (show s) <$> f_ (t, I.TType) <*> chain [] t (I.mkConPars n et ++ xs) |
896 | where t = I.conType et s | ||
896 | I.TyCon s xs -> Con (show s) <$> f_ (I.nType s, I.TType) <*> chain [] (I.nType s) xs | 897 | I.TyCon s xs -> Con (show s) <$> f_ (I.nType s, I.TType) <*> chain [] (I.nType s) xs |
897 | I.Fun s xs -> Fun (show s) <$> f_ (I.nType s, I.TType) <*> chain [] (I.nType s) xs | 898 | I.Fun s xs -> Fun (show s) <$> f_ (I.nType s, I.TType) <*> chain [] (I.nType s) xs |
898 | I.CaseFun s xs n -> asks makeTE >>= \te -> Fun (show s) <$> f_ (I.nType s, I.TType) <*> chain [] (I.nType s) (I.makeCaseFunPars te n ++ xs ++ [I.Neut n]) | 899 | I.CaseFun s xs n -> asks makeTE >>= \te -> Fun (show s) <$> f_ (I.nType s, I.TType) <*> chain [] (I.nType s) (I.makeCaseFunPars te n ++ xs ++ [I.Neut n]) |
diff --git a/src/LambdaCube/Compiler/Infer.hs b/src/LambdaCube/Compiler/Infer.hs index ae2a9f1b..21ffe022 100644 --- a/src/LambdaCube/Compiler/Infer.hs +++ b/src/LambdaCube/Compiler/Infer.hs | |||
@@ -26,7 +26,7 @@ module LambdaCube.Compiler.Infer | |||
26 | , Infos(..), listInfos, ErrorMsg(..), PolyEnv(..), ErrorT, throwErrorTCM, parseLC, joinPolyEnvs, filterPolyEnv, inference_ | 26 | , Infos(..), listInfos, ErrorMsg(..), PolyEnv(..), ErrorT, throwErrorTCM, parseLC, joinPolyEnvs, filterPolyEnv, inference_ |
27 | , ImportItems (..) | 27 | , ImportItems (..) |
28 | , SI(..), Range(..) | 28 | , SI(..), Range(..) |
29 | , nType, neutType, appTy, mkConPars, makeCaseFunPars, unpmlabel | 29 | , nType, conType, neutType, appTy, mkConPars, makeCaseFunPars, unpmlabel |
30 | , MaxDB(..) | 30 | , MaxDB(..) |
31 | ) where | 31 | ) where |
32 | import Data.Monoid | 32 | import Data.Monoid |
@@ -69,9 +69,9 @@ data Neutral | |||
69 | | PMLabel_ FunName !Int [Exp] Exp{-unfolded expression-} | 69 | | PMLabel_ FunName !Int [Exp] Exp{-unfolded expression-} |
70 | deriving (Show) | 70 | deriving (Show) |
71 | 71 | ||
72 | data ConName = ConName SName MFixity Int{-ordinal number, e.g. Zero:0, Succ:1-} TyConName Type | 72 | data ConName = ConName SName MFixity Int{-ordinal number, e.g. Zero:0, Succ:1-} Type |
73 | 73 | ||
74 | data TyConName = TyConName SName MFixity Int{-num of indices-} Type [ConName]{-constructors-} CaseFunName | 74 | data TyConName = TyConName SName MFixity Int{-num of indices-} Type [(ConName, Type)]{-constructors-} CaseFunName |
75 | 75 | ||
76 | data FunName = FunName_ SName ([Exp] -> Exp) MFixity Type | 76 | data FunName = FunName_ SName ([Exp] -> Exp) MFixity Type |
77 | pattern FunName a b c <- FunName_ a _ b c where FunName a b c = funName a b c | 77 | pattern FunName a b c <- FunName_ a _ b c where FunName a b c = funName a b c |
@@ -86,8 +86,8 @@ type Type = Exp | |||
86 | type ExpType = (Exp, Type) | 86 | type ExpType = (Exp, Type) |
87 | type SExp2 = SExp' ExpType | 87 | type SExp2 = SExp' ExpType |
88 | 88 | ||
89 | instance Show ConName where show (ConName n _ _ _ _) = n | 89 | instance Show ConName where show (ConName n _ _ _) = n |
90 | instance Eq ConName where ConName _ _ n _ _ == ConName _ _ n' _ _ = n == n' | 90 | instance Eq ConName where ConName _ _ n _ == ConName _ _ n' _ = n == n' |
91 | instance Show TyConName where show (TyConName n _ _ _ _ _) = n | 91 | instance Show TyConName where show (TyConName n _ _ _ _ _) = n |
92 | instance Eq TyConName where TyConName n _ _ _ _ _ == TyConName n' _ _ _ _ _ = n == n' | 92 | instance Eq TyConName where TyConName n _ _ _ _ _ == TyConName n' _ _ _ _ _ = n == n' |
93 | instance Show FunName where show (FunName n _ _) = n | 93 | instance Show FunName where show (FunName n _ _) = n |
@@ -115,9 +115,7 @@ pattern Var a = Neut (Var_ a) | |||
115 | conParams (conTypeName -> TyConName _ _ _ _ _ (CaseFunName _ _ pars)) = pars | 115 | conParams (conTypeName -> TyConName _ _ _ _ _ (CaseFunName _ _ pars)) = pars |
116 | mkConPars n (snd . getParams -> TyCon (TyConName _ _ _ _ _ (CaseFunName _ _ pars)) xs) = take (min n pars) xs | 116 | mkConPars n (snd . getParams -> TyCon (TyConName _ _ _ _ _ (CaseFunName _ _ pars)) xs) = take (min n pars) xs |
117 | mkConPars n x = error $ "mkConPars: " ++ ppShow x | 117 | mkConPars n x = error $ "mkConPars: " ++ ppShow x |
118 | conName a b c d = ConName a b c (get $ snd $ getParams d) d | 118 | conName = ConName |
119 | where | ||
120 | get (TyCon s _) = s | ||
121 | 119 | ||
122 | makeCaseFunPars te n = case neutType te n of | 120 | makeCaseFunPars te n = case neutType te n of |
123 | TyCon (TyConName _ _ _ _ _ (CaseFunName _ _ pars)) xs -> take pars xs | 121 | TyCon (TyConName _ _ _ _ _ (CaseFunName _ _ pars)) xs -> take pars xs |
@@ -126,7 +124,8 @@ pattern Closed :: () => Up a => a -> a | |||
126 | pattern Closed a <- a where Closed a = closedExp a | 124 | pattern Closed a <- a where Closed a = closedExp a |
127 | 125 | ||
128 | pattern Con x n y <- Con_ _ x n y where Con x n y = Con_ (foldMap maxDB_ y) x n y | 126 | pattern Con x n y <- Con_ _ x n y where Con x n y = Con_ (foldMap maxDB_ y) x n y |
129 | pattern ConN s a <- Con (ConName s _ _ _ _) _ a | 127 | pattern ConN s a <- Con (ConName s _ _ _) _ a |
128 | pattern ConN' s a <- Con (ConName _ _ s _) _ a | ||
130 | tCon s i t a = Con (conName s Nothing i t) 0 a | 129 | tCon s i t a = Con (conName s Nothing i t) 0 a |
131 | tCon_ k s i t a = Con (conName s Nothing i t) k a | 130 | tCon_ k s i t a = Con (conName s Nothing i t) k a |
132 | pattern TyCon x y <- TyCon_ _ x y where TyCon x y = TyCon_ (foldMap maxDB_ y) x y | 131 | pattern TyCon x y <- TyCon_ _ x y where TyCon x y = TyCon_ (foldMap maxDB_ y) x y |
@@ -136,26 +135,31 @@ pattern FunN a b <- Fun (FunName a _ _) b | |||
136 | pattern TFun a t b <- Fun (FunName a _ t) b where TFun a t b = Fun (FunName a Nothing t) b | 135 | pattern TFun a t b <- Fun (FunName a _ t) b where TFun a t b = Fun (FunName a Nothing t) b |
137 | pattern TFun' a t b <- Fun_ (FunName a _ t) b where TFun' a t b = Fun_ (FunName a Nothing t) b | 136 | pattern TFun' a t b <- Fun_ (FunName a _ t) b where TFun' a t b = Fun_ (FunName a Nothing t) b |
138 | pattern TyConN s a <- TyCon (TyConName s _ _ _ _ _) a | 137 | pattern TyConN s a <- TyCon (TyConName s _ _ _ _ _) a |
139 | pattern TTyCon s t a <- TyCon (TyConName s _ _ t _ _) a where TTyCon s t a = TyCon (TyConName s Nothing (error "todo: inum") t (error "todo: tcn cons 2") $ CaseFunName (error "TTyCon-A") (error "TTyCon-B") $ length a) a | 138 | pattern TTyCon s t a <- TyCon (TyConName s _ _ t _ _) a |
140 | pattern TTyCon0 s <- TyCon (TyConName s _ _ TType _ _) [] where TTyCon0 s = Closed $ TyCon (TyConName s Nothing 0 TType (error "todo: tcn cons 3") $ CaseFunName (error "TTyCon0-A") (error "TTyCon0-B") 0) [] | 139 | tTyCon s t a cs = TyCon (TyConName s Nothing (error "todo: inum") t (map ((,) (error "tTyCon")) cs) $ CaseFunName (error "TTyCon-A") (error "TTyCon-B") $ length a) a |
140 | pattern TTyCon0 s <- TyCon (TyConName s _ _ TType _ _) [] | ||
141 | tTyCon0 s cs = Closed $ TyCon (TyConName s Nothing 0 TType (map ((,) (error "tTyCon0")) cs) $ CaseFunName (error "TTyCon0-A") (error "TTyCon0-B") 0) [] | ||
141 | pattern a :~> b = Pi Visible a b | 142 | pattern a :~> b = Pi Visible a b |
142 | 143 | ||
143 | pattern Unit = TTyCon0 "'Unit" | 144 | pattern Unit <- TTyCon0 "'Unit" where Unit = tTyCon0 "'Unit" [Unit] |
144 | pattern TInt = TTyCon0 "'Int" | 145 | pattern TInt <- TTyCon0 "'Int" where TInt = tTyCon0 "'Int" $ error "cs 1" |
145 | pattern TImageSemantics = TTyCon0 "'ImageSemantics" | 146 | pattern TImageSemantics <- TTyCon0 "'ImageSemantics" where TImageSemantics = tTyCon0 "'ImageSemantics" $ error "cs 2" |
146 | pattern TNat = TTyCon0 "'Nat" | 147 | pattern TNat <- TTyCon0 "'Nat" where TNat = tTyCon0 "'Nat" $ error "cs 3" |
147 | pattern TBool = TTyCon0 "'Bool" | 148 | pattern TBool <- TTyCon0 "'Bool" where TBool = tTyCon0 "'Bool" $ error "cs 4" |
148 | pattern TFloat = TTyCon0 "'Float" | 149 | pattern TFloat <- TTyCon0 "'Float" where TFloat = tTyCon0 "'Float" $ error "cs 5" |
149 | pattern TString = TTyCon0 "'String" | 150 | pattern TString <- TTyCon0 "'String" where TString = tTyCon0 "'String" $ error "cs 6" |
150 | pattern TChar = TTyCon0 "'Char" | 151 | pattern TChar <- TTyCon0 "'Char" where TChar = tTyCon0 "'Char" $ error "cs 7" |
151 | pattern TOrdering = TTyCon0 "'Ordering" | 152 | pattern TOrdering <- TTyCon0 "'Ordering" where TOrdering = tTyCon0 "'Ordering" $ error "cs 8" |
152 | pattern TTuple2 a b = TTyCon "'Tuple2" (TType :~> TType :~> TType) [a, b] | 153 | pattern TOutput <- TTyCon0 "'Output" where TOutput = tTyCon0 "'Output" $ error "cs 9" |
153 | pattern TVec a b <- TyConN "'VecS" {-(TType :~> TNat :~> TType)-} [b, a] | 154 | pattern TTuple0 <- TTyCon0 "'Tuple0" where TTuple0 = tTyCon0 "'Tuple0" $ error "cs 10" |
154 | pattern TList a = TTyCon "'List" (TType :~> TType) [a] | 155 | pattern TVec a b <- TyConN "'VecS" {-(TType :~> TNat :~> TType)-} [b, a] |
156 | --pattern TTuple2 a b = TTyCon "'Tuple2" (TType :~> TType :~> TType) [a, b] | ||
157 | pattern TList a <- TyConN "'List" [a] where TList a = tTyCon "'List" (TType :~> TType) [a] $ error "cs 11" | ||
158 | pattern TInterpolated x <- TyConN "'Interpolated" [x] where TInterpolated x = tTyCon "'Interpolated" (TType :~> TType) [x] $ error "cs 12" | ||
155 | pattern Empty s <- TyCon (TyConName "'Empty" _ _ _ _ _) [EString s] where | 159 | pattern Empty s <- TyCon (TyConName "'Empty" _ _ _ _ _) [EString s] where |
156 | Empty s = TyCon (TyConName "'Empty" Nothing (error "todo: inum2_") (TString :~> TType) (error "todo: tcn cons 3_") $ error "Empty") [EString s] | 160 | Empty s = TyCon (TyConName "'Empty" Nothing (error "todo: inum2_") (TString :~> TType) (error "todo: tcn cons 3_") $ error "Empty") [EString s] |
157 | 161 | ||
158 | pattern TT <- ConN "TT" _ where TT = Closed (tCon "TT" 0 Unit []) | 162 | pattern TT <- ConN' _ _ where TT = Closed (tCon "TT" 0 Unit []) |
159 | nil = (tCon_ 1 "Nil" 0 (Pi Hidden TType $ TList (Var 0)) []) | 163 | nil = (tCon_ 1 "Nil" 0 (Pi Hidden TType $ TList (Var 0)) []) |
160 | cons a b = (tCon_ 1 "Cons" 1 (Pi Hidden TType $ Var 0 :~> TList (Var 1) :~> TList (Var 2)) [a, b]) | 164 | cons a b = (tCon_ 1 "Cons" 1 (Pi Hidden TType $ Var 0 :~> TList (Var 1) :~> TList (Var 2)) [a, b]) |
161 | pattern Zero <- ConN "Zero" _ where Zero = Closed (tCon "Zero" 0 TNat []) | 165 | pattern Zero <- ConN "Zero" _ where Zero = Closed (tCon "Zero" 0 TNat []) |
@@ -177,6 +181,7 @@ pattern EChar a = ELit (LChar a) | |||
177 | pattern EString a = ELit (LString a) | 181 | pattern EString a = ELit (LString a) |
178 | pattern EBool a <- (getEBool -> Just a) where EBool = mkBool | 182 | pattern EBool a <- (getEBool -> Just a) where EBool = mkBool |
179 | pattern ENat n <- (fromNatE -> Just n) where ENat = toNatE | 183 | pattern ENat n <- (fromNatE -> Just n) where ENat = toNatE |
184 | pattern ENat' n <- (fromNatE' -> Just n) | ||
180 | 185 | ||
181 | pattern NoTup <- (noTup -> True) | 186 | pattern NoTup <- (noTup -> True) |
182 | 187 | ||
@@ -191,19 +196,24 @@ pattern NoTup <- (noTup -> True) | |||
191 | --tTuple3 a b c = TTyCon "'Tuple3" (TType :~> TType :~> TType :~> TType) [a, b, c] | 196 | --tTuple3 a b c = TTyCon "'Tuple3" (TType :~> TType :~> TType :~> TType) [a, b, c] |
192 | 197 | ||
193 | toNatE :: Int -> Exp | 198 | toNatE :: Int -> Exp |
194 | toNatE 0 = Closed Zero | 199 | toNatE 0 = Zero |
195 | toNatE n | n > 0 = Closed (Succ (toNatE (n - 1))) | 200 | toNatE n | n > 0 = Closed (Succ (toNatE (n - 1))) |
196 | 201 | ||
197 | fromNatE :: Exp -> Maybe Int | 202 | fromNatE :: Exp -> Maybe Int |
198 | fromNatE Zero = Just 0 | 203 | fromNatE (ConN' 0 _) = Just 0 |
199 | fromNatE (Succ n) = (1 +) <$> fromNatE n | 204 | fromNatE (ConN' 1 [n]) = (1 +) <$> fromNatE n |
200 | fromNatE _ = Nothing | 205 | fromNatE _ = Nothing |
201 | 206 | ||
207 | fromNatE' :: Exp -> Maybe Int | ||
208 | fromNatE' Zero = Just 0 | ||
209 | fromNatE' (Succ n) = (1 +) <$> fromNatE' n | ||
210 | fromNatE' _ = Nothing | ||
211 | |||
202 | mkBool False = Closed $ tCon "False" 0 TBool [] | 212 | mkBool False = Closed $ tCon "False" 0 TBool [] |
203 | mkBool True = Closed $ tCon "True" 1 TBool [] | 213 | mkBool True = Closed $ tCon "True" 1 TBool [] |
204 | 214 | ||
205 | getEBool (ConN "False" _) = Just False | 215 | getEBool (ConN' 0 _) = Just False |
206 | getEBool (ConN "True" _) = Just True | 216 | getEBool (ConN' 1 _) = Just True |
207 | getEBool _ = Nothing | 217 | getEBool _ = Nothing |
208 | 218 | ||
209 | mkOrdering x = Closed $ case x of | 219 | mkOrdering x = Closed $ case x of |
@@ -215,9 +225,9 @@ noTup (TyConN s _) = take 6 s /= "'Tuple" -- todo | |||
215 | noTup _ = False | 225 | noTup _ = False |
216 | 226 | ||
217 | conTypeName :: ConName -> TyConName | 227 | conTypeName :: ConName -> TyConName |
218 | conTypeName (ConName _ _ _ t _) = t | 228 | conTypeName (ConName _ _ _ t) = case snd $ getParams t of TyCon n _ -> n |
219 | 229 | ||
220 | outputType = TTyCon0 "'Output" | 230 | outputType = TOutput |
221 | boolType = TBool | 231 | boolType = TBool |
222 | trueExp = EBool True | 232 | trueExp = EBool True |
223 | 233 | ||
@@ -427,7 +437,7 @@ varType err n_ env = f n_ env where | |||
427 | f n e = either (error $ "varType: " ++ err ++ "\n" ++ show n_ ++ "\n" ++ ppShow env) (f n) $ parent e | 437 | f n e = either (error $ "varType: " ++ err ++ "\n" ++ show n_ ++ "\n" ++ ppShow env) (f n) $ parent e |
428 | 438 | ||
429 | -------------------------------------------------------------------------------- reduction | 439 | -------------------------------------------------------------------------------- reduction |
430 | evalCaseFun a ps (Con n@(ConName _ _ i _ _) _ vs) | 440 | evalCaseFun a ps (Con n@(ConName _ _ i _) _ vs) |
431 | | i /= (-1) = foldl app_ (ps !!! (i + 1)) vs | 441 | | i /= (-1) = foldl app_ (ps !!! (i + 1)) vs |
432 | | otherwise = error "evcf" | 442 | | otherwise = error "evcf" |
433 | where | 443 | where |
@@ -485,14 +495,14 @@ getFunDef s = case show s of | |||
485 | "primCompareString" -> \case [EString x, EString y] -> mkOrdering $ x `compare` y; xs -> f xs | 495 | "primCompareString" -> \case [EString x, EString y] -> mkOrdering $ x `compare` y; xs -> f xs |
486 | 496 | ||
487 | -- LambdaCube 3D specific primitives | 497 | -- LambdaCube 3D specific primitives |
488 | "PrimGreaterThan" -> \case [_, _, _, _, _, _, _, x, y] | Just r <- twoOpBool (>) x y -> r; xs -> f xs | 498 | "PrimGreaterThan" -> \case [t, _, _, _, _, _, _, x, y] | Just r <- twoOpBool (>) t x y -> r; xs -> f xs |
489 | "PrimGreaterThanEqual" -> \case [_, _, _, _, _, _, _, x, y] | Just r <- twoOpBool (>=) x y -> r; xs -> f xs | 499 | "PrimGreaterThanEqual" -> \case [t, _, _, _, _, _, _, x, y] | Just r <- twoOpBool (>=) t x y -> r; xs -> f xs |
490 | "PrimLessThan" -> \case [_, _, _, _, _, _, _, x, y] | Just r <- twoOpBool (<) x y -> r; xs -> f xs | 500 | "PrimLessThan" -> \case [t, _, _, _, _, _, _, x, y] | Just r <- twoOpBool (<) t x y -> r; xs -> f xs |
491 | "PrimLessThanEqual" -> \case [_, _, _, _, _, _, _, x, y] | Just r <- twoOpBool (<=) x y -> r; xs -> f xs | 501 | "PrimLessThanEqual" -> \case [t, _, _, _, _, _, _, x, y] | Just r <- twoOpBool (<=) t x y -> r; xs -> f xs |
492 | "PrimEqualV" -> \case [_, _, _, _, _, _, _, x, y] | Just r <- twoOpBool (==) x y -> r; xs -> f xs | 502 | "PrimEqualV" -> \case [t, _, _, _, _, _, _, x, y] | Just r <- twoOpBool (==) t x y -> r; xs -> f xs |
493 | "PrimNotEqualV" -> \case [_, _, _, _, _, _, _, x, y] | Just r <- twoOpBool (/=) x y -> r; xs -> f xs | 503 | "PrimNotEqualV" -> \case [t, _, _, _, _, _, _, x, y] | Just r <- twoOpBool (/=) t x y -> r; xs -> f xs |
494 | "PrimEqual" -> \case [_, _, _, x, y] | Just r <- twoOpBool (==) x y -> r; xs -> f xs | 504 | "PrimEqual" -> \case [t, _, _, x, y] | Just r <- twoOpBool (==) t x y -> r; xs -> f xs |
495 | "PrimNotEqual" -> \case [_, _, _, x, y] | Just r <- twoOpBool (/=) x y -> r; xs -> f xs | 505 | "PrimNotEqual" -> \case [t, _, _, x, y] | Just r <- twoOpBool (/=) t x y -> r; xs -> f xs |
496 | "PrimSubS" -> \case [_, _, _, _, x, y] | Just r <- twoOp (-) x y -> r; xs -> f xs | 506 | "PrimSubS" -> \case [_, _, _, _, x, y] | Just r <- twoOp (-) x y -> r; xs -> f xs |
497 | "PrimSub" -> \case [_, _, x, y] | Just r <- twoOp (-) x y -> r; xs -> f xs | 507 | "PrimSub" -> \case [_, _, x, y] | Just r <- twoOp (-) x y -> r; xs -> f xs |
498 | "PrimAddS" -> \case [_, _, _, _, x, y] | Just r <- twoOp (+) x y -> r; xs -> f xs | 508 | "PrimAddS" -> \case [_, _, _, _, x, y] | Just r <- twoOp (+) x y -> r; xs -> f xs |
@@ -507,7 +517,7 @@ getFunDef s = case show s of | |||
507 | "PrimAnd" -> \case [EBool x, EBool y] -> EBool (x && y); xs -> f xs | 517 | "PrimAnd" -> \case [EBool x, EBool y] -> EBool (x && y); xs -> f xs |
508 | "PrimOr" -> \case [EBool x, EBool y] -> EBool (x || y); xs -> f xs | 518 | "PrimOr" -> \case [EBool x, EBool y] -> EBool (x || y); xs -> f xs |
509 | "PrimXor" -> \case [EBool x, EBool y] -> EBool (x /= y); xs -> f xs | 519 | "PrimXor" -> \case [EBool x, EBool y] -> EBool (x /= y); xs -> f xs |
510 | "PrimNot" -> \case [_, _, _, EBool x] -> EBool $ not x; xs -> f xs | 520 | "PrimNot" -> \case [TNat, _, _, EBool x] -> EBool $ not x; xs -> f xs |
511 | 521 | ||
512 | _ -> f | 522 | _ -> f |
513 | where | 523 | where |
@@ -521,7 +531,7 @@ cstr = f [] | |||
521 | f ns typ (FixLabel _ a) a' = f ns typ a a' | 531 | f ns typ (FixLabel _ a) a' = f ns typ a a' |
522 | f ns typ a (FixLabel _ a') = f ns typ a a' | 532 | f ns typ a (FixLabel _ a') = f ns typ a a' |
523 | f ns typ (Con a n xs) (Con a' n' xs') | a == a' && n == n' && length xs == length xs' = | 533 | f ns typ (Con a n xs) (Con a' n' xs') | a == a' && n == n' && length xs == length xs' = |
524 | if null xs then Unit else ff ns (foldl appTy (nType a) $ mkConPars n typ) $ zip xs xs' | 534 | if null xs then Unit else ff ns (foldl appTy (conType typ a) $ mkConPars n typ) $ zip xs xs' |
525 | f ns typ (TyCon a xs) (TyCon a' xs') | a == a' && length xs == length xs' = | 535 | f ns typ (TyCon a xs) (TyCon a' xs') | a == a' && length xs == length xs' = |
526 | ff ns (nType a) $ zip xs xs' | 536 | ff ns (nType a) $ zip xs xs' |
527 | f (_: ns) typ{-down?-} (down 0 -> Just a) (down 0 -> Just a') = f ns typ a a' | 537 | f (_: ns) typ{-down?-} (down 0 -> Just a) (down 0 -> Just a') = f ns typ a a' |
@@ -537,9 +547,9 @@ cstr = f [] | |||
537 | 547 | ||
538 | f ns@[] TType (TyConN "'Tuple2" [x, y]) (UFunN "'JoinTupleType" [x', y']) = t2 (f ns TType x x') (f ns TType y y') | 548 | f ns@[] TType (TyConN "'Tuple2" [x, y]) (UFunN "'JoinTupleType" [x', y']) = t2 (f ns TType x x') (f ns TType y y') |
539 | f ns@[] TType (UFunN "'JoinTupleType" [x', y']) (TyConN "'Tuple2" [x, y]) = t2 (f ns TType x' x) (f ns TType y' y) | 549 | f ns@[] TType (UFunN "'JoinTupleType" [x', y']) (TyConN "'Tuple2" [x, y]) = t2 (f ns TType x' x) (f ns TType y' y) |
540 | f ns@[] TType (UFunN "'JoinTupleType" [x', y']) x@NoTup = t2 (f ns TType x' x) (f ns TType y' $ TTyCon0 "'Tuple0") | 550 | f ns@[] TType (UFunN "'JoinTupleType" [x', y']) x@NoTup = t2 (f ns TType x' x) (f ns TType y' TTuple0) |
541 | 551 | ||
542 | f ns@[] TType (x@NoTup) (UFunN "'InterpolatedType" [x']) = f ns TType (TTyCon "'Interpolated" (TType :~> TType) [x]) x' | 552 | f ns@[] TType (x@NoTup) (UFunN "'InterpolatedType" [x']) = f ns TType (TInterpolated x) x' |
543 | 553 | ||
544 | f [] typ a@Neut{} a' = CstrT typ a a' | 554 | f [] typ a@Neut{} a' = CstrT typ a a' |
545 | f [] typ a a'@Neut{} = CstrT typ a a' | 555 | f [] typ a a'@Neut{} = CstrT typ a a' |
@@ -593,13 +603,13 @@ twoOp_ _ _ _ _ = Nothing | |||
593 | 603 | ||
594 | modF x y = x - fromIntegral (floor (x / y)) * y | 604 | modF x y = x - fromIntegral (floor (x / y)) * y |
595 | 605 | ||
596 | twoOpBool :: (forall a . Ord a => a -> a -> Bool) -> Exp -> Exp -> Maybe Exp | 606 | twoOpBool :: (forall a . Ord a => a -> a -> Bool) -> Exp -> Exp -> Exp -> Maybe Exp |
597 | twoOpBool f (EFloat x) (EFloat y) = Just $ EBool $ f x y | 607 | twoOpBool f t (EFloat x) (EFloat y) = Just $ EBool $ f x y |
598 | twoOpBool f (EInt x) (EInt y) = Just $ EBool $ f x y | 608 | twoOpBool f t (EInt x) (EInt y) = Just $ EBool $ f x y |
599 | twoOpBool f (EString x) (EString y) = Just $ EBool $ f x y | 609 | twoOpBool f t (EString x) (EString y) = Just $ EBool $ f x y |
600 | twoOpBool f (EChar x) (EChar y) = Just $ EBool $ f x y | 610 | twoOpBool f t (EChar x) (EChar y) = Just $ EBool $ f x y |
601 | twoOpBool f (ENat x) (ENat y) = Just $ EBool $ f x y | 611 | twoOpBool f TNat (ENat x) (ENat y) = Just $ EBool $ f x y |
602 | twoOpBool _ _ _ = Nothing | 612 | twoOpBool _ _ _ _ = Nothing |
603 | 613 | ||
604 | app_ :: Exp -> Exp -> Exp | 614 | app_ :: Exp -> Exp -> Exp |
605 | app_ (Lam x) a = subst 0 a x | 615 | app_ (Lam x) a = subst 0 a x |
@@ -705,11 +715,13 @@ litType = \case | |||
705 | class NType a where nType :: a -> Type | 715 | class NType a where nType :: a -> Type |
706 | 716 | ||
707 | instance NType FunName where nType (FunName _ _ t) = t | 717 | instance NType FunName where nType (FunName _ _ t) = t |
708 | instance NType ConName where nType (ConName _ _ _ _ t) = t | 718 | --instance NType ConName where nType (ConName _ _ _ t) = t |
709 | instance NType TyConName where nType (TyConName _ _ _ t _ _) = t | 719 | instance NType TyConName where nType (TyConName _ _ _ t _ _) = t |
710 | instance NType CaseFunName where nType (CaseFunName _ t _) = t | 720 | instance NType CaseFunName where nType (CaseFunName _ t _) = t |
711 | instance NType TyCaseFunName where nType (TyCaseFunName _ t) = t | 721 | instance NType TyCaseFunName where nType (TyCaseFunName _ t) = t |
712 | 722 | ||
723 | conType (snd . getParams -> TyCon (TyConName _ _ _ _ cs _) _) (ConName _ _ n t) = t -- snd $ cs !! n | ||
724 | |||
713 | neutType te = \case | 725 | neutType te = \case |
714 | App_ f x -> appTy (neutType te f) x | 726 | App_ f x -> appTy (neutType te f) x |
715 | Var_ i -> snd $ varType "C" i te | 727 | Var_ i -> snd $ varType "C" i te |
@@ -962,7 +974,7 @@ recheck' msg' e (x, xt) = (recheck_ "main" (checkEnv e) (x, xt), xt) | |||
962 | (Neut (App_ a b), zt) | 974 | (Neut (App_ a b), zt) |
963 | | (Neut a', at) <- recheck'' "app1" te (Neut a, neutType te a) | 975 | | (Neut a', at) <- recheck'' "app1" te (Neut a, neutType te a) |
964 | -> checkApps "a" [] zt (Neut . App_ a' . head) te at [b] | 976 | -> checkApps "a" [] zt (Neut . App_ a' . head) te at [b] |
965 | (Con s n as, zt) -> checkApps (show s) [] zt (Con s n . drop (conParams s)) te (nType s) $ mkConPars n zt ++ as | 977 | (Con s n as, zt) -> checkApps (show s) [] zt (Con s n . drop (conParams s)) te (conType zt s) $ mkConPars n zt ++ as |
966 | (TyCon s as, zt) -> checkApps (show s) [] zt (TyCon s) te (nType s) as | 978 | (TyCon s as, zt) -> checkApps (show s) [] zt (TyCon s) te (nType s) as |
967 | (Fun s as, zt) -> checkApps (show s ++ ppShow as ++ ppShow (nType s)) [] zt (Fun s) te (nType s) as | 979 | (Fun s as, zt) -> checkApps (show s ++ ppShow as ++ ppShow (nType s)) [] zt (Fun s) te (nType s) as |
968 | (CaseFun s@(CaseFunName _ t pars) as n, zt) -> checkApps (show s) [] zt (\xs -> evalCaseFun s (init $ drop pars xs) (last xs)) te (nType s) (makeCaseFunPars te n ++ as ++ [Neut n]) | 980 | (CaseFun s@(CaseFunName _ t pars) as n, zt) -> checkApps (show s) [] zt (\xs -> evalCaseFun s (init $ drop pars xs) (last xs)) te (nType s) (makeCaseFunPars te n ++ as ++ [Neut n]) |
@@ -1049,7 +1061,7 @@ extractDesugarInfo :: GlobalEnv -> DesugarInfo | |||
1049 | extractDesugarInfo ge = | 1061 | extractDesugarInfo ge = |
1050 | ( Map.fromList | 1062 | ( Map.fromList |
1051 | [ (n, f) | (n, (d, _, si)) <- Map.toList ge, f <- maybeToList $ case d of | 1063 | [ (n, f) | (n, (d, _, si)) <- Map.toList ge, f <- maybeToList $ case d of |
1052 | Con (ConName _ f _ _ _) 0 [] -> f | 1064 | Con (ConName _ f _ _) 0 [] -> f |
1053 | TyCon (TyConName _ f _ _ _ _) [] -> f | 1065 | TyCon (TyConName _ f _ _ _ _) [] -> f |
1054 | (getLams -> (Fun (FunName _ f _) [])) -> f | 1066 | (getLams -> (Fun (FunName _ f _) [])) -> f |
1055 | PMLabel (FunName _ f _) _ [] _ -> f | 1067 | PMLabel (FunName _ f _) _ [] _ -> f |
@@ -1065,7 +1077,7 @@ extractDesugarInfo ge = | |||
1065 | ] | 1077 | ] |
1066 | ) | 1078 | ) |
1067 | where | 1079 | where |
1068 | f (ConName n _ _ _ ct) = (n, pars ct) | 1080 | f (ConName n _ _ _, ct) = (n, pars ct) |
1069 | pars = length . filter ((==Visible) . fst) . fst . getParams | 1081 | pars = length . filter ((==Visible) . fst) . fst . getParams |
1070 | 1082 | ||
1071 | -------------------------------------------------------------------------------- infos | 1083 | -------------------------------------------------------------------------------- infos |
@@ -1116,7 +1128,7 @@ handleStmt defs = \case | |||
1116 | acts = map fst . fst . getParams $ cty | 1128 | acts = map fst . fst . getParams $ cty |
1117 | conn = conName (snd cn) (listToMaybe [f | PrecDef n f <- defs, n == cn]) j cty | 1129 | conn = conName (snd cn) (listToMaybe [f | PrecDef n f <- defs, n == cn]) j cty |
1118 | addToEnv cn (Con conn 0 [], cty) | 1130 | addToEnv cn (Con conn 0 [], cty) |
1119 | return ( conn | 1131 | return ( (conn, cty) |
1120 | , addParamsS pars | 1132 | , addParamsS pars |
1121 | $ foldl SAppV (SVar (debugSI "22", ".cs") $ j + length pars) $ drop pnum' xs ++ [apps' (SGlobal cn) (zip acts $ downToS (j+1+length pars) (length ps) ++ downToS 0 (act- length ps))] | 1133 | $ foldl SAppV (SVar (debugSI "22", ".cs") $ j + length pars) $ drop pnum' xs ++ [apps' (SGlobal cn) (zip acts $ downToS (j+1+length pars) (length ps) ++ downToS 0 (act- length ps))] |
1122 | ) | 1134 | ) |
@@ -1330,7 +1342,7 @@ instance MkDoc Exp where | |||
1330 | -- Lam h a b -> join $ shLam (used 0 b) (BLam h) <$> f a <*> pure (f b) | 1342 | -- Lam h a b -> join $ shLam (used 0 b) (BLam h) <$> f a <*> pure (f b) |
1331 | Lam b -> join $ shLam True (BLam Visible) <$> f TType{-todo-} <*> pure (f b) | 1343 | Lam b -> join $ shLam True (BLam Visible) <$> f TType{-todo-} <*> pure (f b) |
1332 | Pi h a b -> join $ shLam (used 0 b) (BPi h) <$> f a <*> pure (f b) | 1344 | Pi h a b -> join $ shLam (used 0 b) (BPi h) <$> f a <*> pure (f b) |
1333 | ENat n -> pure $ shAtom $ show n | 1345 | ENat' n -> pure $ shAtom $ show n |
1334 | Con s _ xs -> foldl (shApp Visible) (shAtom_ $ show s) <$> mapM f xs | 1346 | Con s _ xs -> foldl (shApp Visible) (shAtom_ $ show s) <$> mapM f xs |
1335 | TyConN s xs -> foldl (shApp Visible) (shAtom_ s) <$> mapM f xs | 1347 | TyConN s xs -> foldl (shApp Visible) (shAtom_ s) <$> mapM f xs |
1336 | TType -> pure $ shAtom "Type" | 1348 | TType -> pure $ shAtom "Type" |
diff --git a/testdata/Builtins.out b/testdata/Builtins.out index a83047df..1735f193 100644 --- a/testdata/Builtins.out +++ b/testdata/Builtins.out | |||
@@ -1979,19 +1979,19 @@ testdata/Builtins.lc 464:42-464:46 Type | |||
1979 | testdata/Builtins.lc 464:42-464:54 Type | 1979 | testdata/Builtins.lc 464:42-464:54 Type |
1980 | testdata/Builtins.lc 464:50-464:54 Type | 1980 | testdata/Builtins.lc 464:50-464:54 Type |
1981 | testdata/Builtins.lc 465:1-465:8 {a} -> {b:Nat} -> {c : a ~ VecScalar b Bool} -> a->a | 1981 | testdata/Builtins.lc 465:1-465:8 {a} -> {b:Nat} -> {c : a ~ VecScalar b Bool} -> a->a |
1982 | testdata/Builtins.lc 465:34-465:56 Type | 1982 | testdata/Builtins.lc 465:47-465:69 Type |
1983 | testdata/Builtins.lc 465:34-465:66 Type | 1983 | testdata/Builtins.lc 465:47-465:79 Type |
1984 | testdata/Builtins.lc 465:35-465:36 V3 | 1984 | testdata/Builtins.lc 465:48-465:49 V3 |
1985 | testdata/Builtins.lc 465:35-465:38 Type->Type | 1985 | testdata/Builtins.lc 465:48-465:51 Type->Type |
1986 | testdata/Builtins.lc 465:37-465:38 Type -> Type->Type | 1986 | testdata/Builtins.lc 465:50-465:51 Type -> Type->Type |
1987 | testdata/Builtins.lc 465:39-465:48 Nat -> Type->Type | 1987 | testdata/Builtins.lc 465:52-465:61 Nat -> Type->Type |
1988 | testdata/Builtins.lc 465:39-465:50 Type->Type | 1988 | testdata/Builtins.lc 465:52-465:63 Type->Type |
1989 | testdata/Builtins.lc 465:39-465:55 Type | 1989 | testdata/Builtins.lc 465:52-465:68 Type |
1990 | testdata/Builtins.lc 465:49-465:50 V1 | 1990 | testdata/Builtins.lc 465:62-465:63 V1 |
1991 | testdata/Builtins.lc 465:51-465:55 Type | 1991 | testdata/Builtins.lc 465:64-465:68 Type |
1992 | testdata/Builtins.lc 465:60-465:61 Type | 1992 | testdata/Builtins.lc 465:73-465:74 Type |
1993 | testdata/Builtins.lc 465:60-465:66 Type | 1993 | testdata/Builtins.lc 465:73-465:79 Type |
1994 | testdata/Builtins.lc 465:65-465:66 Type | 1994 | testdata/Builtins.lc 465:78-465:79 Type |
1995 | testdata/Builtins.lc 466:1-466:8 {a:Nat} -> VecScalar a Bool -> Bool | 1995 | testdata/Builtins.lc 466:1-466:8 {a:Nat} -> VecScalar a Bool -> Bool |
1996 | testdata/Builtins.lc 466:10-466:17 {a:Nat} -> VecScalar a Bool -> Bool | 1996 | testdata/Builtins.lc 466:10-466:17 {a:Nat} -> VecScalar a Bool -> Bool |
1997 | testdata/Builtins.lc 466:34-466:43 Nat -> Type->Type | 1997 | testdata/Builtins.lc 466:34-466:43 Nat -> Type->Type |
@@ -2618,56 +2618,56 @@ testdata/Builtins.lc 509:60-509:69 Type | |||
2618 | testdata/Builtins.lc 509:64-509:65 Nat | 2618 | testdata/Builtins.lc 509:64-509:65 Nat |
2619 | testdata/Builtins.lc 509:66-509:67 Nat | 2619 | testdata/Builtins.lc 509:66-509:67 Nat |
2620 | testdata/Builtins.lc 509:68-509:69 Type | 2620 | testdata/Builtins.lc 509:68-509:69 Type |
2621 | testdata/Builtins.lc 511:1-511:13 {a} -> {b} -> {c:Nat} -> {d} -> {e : Num a} -> {f : b ~ VecScalar c a} -> {g : d ~ VecScalar c Bool} -> b -> b->d | 2621 | testdata/Builtins.lc 511:1-511:13 {a} -> {b:Nat} -> {c} -> {d} -> {e : Num c} -> {f : a ~ VecScalar b c} -> {g : d ~ VecScalar b Bool} -> a -> a->d |
2622 | testdata/Builtins.lc 511:15-511:32 {a} -> {b} -> {c:Nat} -> {d} -> {e : Num a} -> {f : b ~ VecScalar c a} -> {g : d ~ VecScalar c Bool} -> b -> b->d | 2622 | testdata/Builtins.lc 511:15-511:32 {a} -> {b:Nat} -> {c} -> {d} -> {e : Num c} -> {f : a ~ VecScalar b c} -> {g : d ~ VecScalar b Bool} -> a -> a->d |
2623 | testdata/Builtins.lc 511:34-511:49 {a} -> {b} -> {c:Nat} -> {d} -> {e : Num a} -> {f : b ~ VecScalar c a} -> {g : d ~ VecScalar c Bool} -> b -> b->d | 2623 | testdata/Builtins.lc 511:34-511:49 {a} -> {b:Nat} -> {c} -> {d} -> {e : Num c} -> {f : a ~ VecScalar b c} -> {g : d ~ VecScalar b Bool} -> a -> a->d |
2624 | testdata/Builtins.lc 511:51-511:71 {a} -> {b} -> {c:Nat} -> {d} -> {e : Num a} -> {f : b ~ VecScalar c a} -> {g : d ~ VecScalar c Bool} -> b -> b->d | 2624 | testdata/Builtins.lc 511:51-511:71 {a} -> {b:Nat} -> {c} -> {d} -> {e : Num c} -> {f : a ~ VecScalar b c} -> {g : d ~ VecScalar b Bool} -> a -> a->d |
2625 | testdata/Builtins.lc 511:73-511:83 {a} -> {b} -> {c:Nat} -> {d} -> {e : Num a} -> {f : b ~ VecScalar c a} -> {g : d ~ VecScalar c Bool} -> b -> b->d | 2625 | testdata/Builtins.lc 511:73-511:83 {a} -> {b:Nat} -> {c} -> {d} -> {e : Num c} -> {f : a ~ VecScalar b c} -> {g : d ~ VecScalar b Bool} -> a -> a->d |
2626 | testdata/Builtins.lc 511:85-511:98 {a} -> {b} -> {c:Nat} -> {d} -> {e : Num a} -> {f : b ~ VecScalar c a} -> {g : d ~ VecScalar c Bool} -> b -> b->d | 2626 | testdata/Builtins.lc 511:85-511:98 {a} -> {b:Nat} -> {c} -> {d} -> {e : Num c} -> {f : a ~ VecScalar b c} -> {g : d ~ VecScalar b Bool} -> a -> a->d |
2627 | testdata/Builtins.lc 512:34-512:97 Type | 2627 | testdata/Builtins.lc 512:51-512:114 Type |
2628 | testdata/Builtins.lc 512:35-512:38 Type->Type | 2628 | testdata/Builtins.lc 512:52-512:55 Type->Type |
2629 | testdata/Builtins.lc 512:35-512:40 Type | 2629 | testdata/Builtins.lc 512:52-512:57 Type |
2630 | testdata/Builtins.lc 512:39-512:40 V7 | 2630 | testdata/Builtins.lc 512:56-512:57 V3 |
2631 | testdata/Builtins.lc 512:42-512:43 V6 | 2631 | testdata/Builtins.lc 512:59-512:60 V7 |
2632 | testdata/Builtins.lc 512:42-512:45 Type->Type | 2632 | testdata/Builtins.lc 512:59-512:62 Type->Type |
2633 | testdata/Builtins.lc 512:42-512:59 Type | 2633 | testdata/Builtins.lc 512:59-512:76 Type |
2634 | testdata/Builtins.lc 512:42-512:97 Type | 2634 | testdata/Builtins.lc 512:59-512:114 Type |
2635 | testdata/Builtins.lc 512:44-512:45 Type -> Type->Type | 2635 | testdata/Builtins.lc 512:61-512:62 Type -> Type->Type |
2636 | testdata/Builtins.lc 512:46-512:55 Nat -> Type->Type | 2636 | testdata/Builtins.lc 512:63-512:72 Nat -> Type->Type |
2637 | testdata/Builtins.lc 512:46-512:57 Type->Type | 2637 | testdata/Builtins.lc 512:63-512:74 Type->Type |
2638 | testdata/Builtins.lc 512:46-512:59 Type | 2638 | testdata/Builtins.lc 512:63-512:76 Type |
2639 | testdata/Builtins.lc 512:56-512:57 V4 | 2639 | testdata/Builtins.lc 512:73-512:74 V5 |
2640 | testdata/Builtins.lc 512:58-512:59 Type | 2640 | testdata/Builtins.lc 512:75-512:76 Type |
2641 | testdata/Builtins.lc 512:61-512:62 V3 | 2641 | testdata/Builtins.lc 512:78-512:79 V3 |
2642 | testdata/Builtins.lc 512:61-512:64 Type->Type | 2642 | testdata/Builtins.lc 512:78-512:81 Type->Type |
2643 | testdata/Builtins.lc 512:61-512:81 Type | 2643 | testdata/Builtins.lc 512:78-512:98 Type |
2644 | testdata/Builtins.lc 512:61-512:97 Type | 2644 | testdata/Builtins.lc 512:78-512:114 Type |
2645 | testdata/Builtins.lc 512:63-512:64 Type -> Type->Type | 2645 | testdata/Builtins.lc 512:80-512:81 Type -> Type->Type |
2646 | testdata/Builtins.lc 512:65-512:74 Nat -> Type->Type | 2646 | testdata/Builtins.lc 512:82-512:91 Nat -> Type->Type |
2647 | testdata/Builtins.lc 512:65-512:76 Type->Type | 2647 | testdata/Builtins.lc 512:82-512:93 Type->Type |
2648 | testdata/Builtins.lc 512:65-512:81 Type | 2648 | testdata/Builtins.lc 512:82-512:98 Type |
2649 | testdata/Builtins.lc 512:75-512:76 Nat | 2649 | testdata/Builtins.lc 512:92-512:93 Nat |
2650 | testdata/Builtins.lc 512:77-512:81 Type | 2650 | testdata/Builtins.lc 512:94-512:98 Type |
2651 | testdata/Builtins.lc 512:86-512:87 Type | 2651 | testdata/Builtins.lc 512:103-512:104 Type |
2652 | testdata/Builtins.lc 512:86-512:97 Type | 2652 | testdata/Builtins.lc 512:103-512:114 Type |
2653 | testdata/Builtins.lc 512:91-512:92 Type | 2653 | testdata/Builtins.lc 512:108-512:109 Type |
2654 | testdata/Builtins.lc 512:91-512:97 Type | 2654 | testdata/Builtins.lc 512:108-512:114 Type |
2655 | testdata/Builtins.lc 512:96-512:97 Type | 2655 | testdata/Builtins.lc 512:113-512:114 Type |
2656 | testdata/Builtins.lc 513:1-513:10 {a} -> {b} -> {c : a ~ MatVecScalarElem b} -> b -> b->Bool | 2656 | testdata/Builtins.lc 513:1-513:10 {a} -> {b} -> {c : b ~ MatVecScalarElem a} -> a -> a->Bool |
2657 | testdata/Builtins.lc 513:12-513:24 {a} -> {b} -> {c : a ~ MatVecScalarElem b} -> b -> b->Bool | 2657 | testdata/Builtins.lc 513:12-513:24 {a} -> {b} -> {c : b ~ MatVecScalarElem a} -> a -> a->Bool |
2658 | testdata/Builtins.lc 513:34-513:58 Type | 2658 | testdata/Builtins.lc 513:47-513:71 Type |
2659 | testdata/Builtins.lc 513:34-513:76 Type | 2659 | testdata/Builtins.lc 513:47-513:89 Type |
2660 | testdata/Builtins.lc 513:35-513:36 V3 | 2660 | testdata/Builtins.lc 513:48-513:49 V1 |
2661 | testdata/Builtins.lc 513:35-513:38 Type->Type | 2661 | testdata/Builtins.lc 513:48-513:51 Type->Type |
2662 | testdata/Builtins.lc 513:37-513:38 Type -> Type->Type | 2662 | testdata/Builtins.lc 513:50-513:51 Type -> Type->Type |
2663 | testdata/Builtins.lc 513:39-513:55 Type->Type | 2663 | testdata/Builtins.lc 513:52-513:68 Type->Type |
2664 | testdata/Builtins.lc 513:39-513:57 Type | 2664 | testdata/Builtins.lc 513:52-513:70 Type |
2665 | testdata/Builtins.lc 513:56-513:57 V1 | 2665 | testdata/Builtins.lc 513:69-513:70 V2 |
2666 | testdata/Builtins.lc 513:62-513:63 Type | 2666 | testdata/Builtins.lc 513:75-513:76 Type |
2667 | testdata/Builtins.lc 513:62-513:76 Type | 2667 | testdata/Builtins.lc 513:75-513:89 Type |
2668 | testdata/Builtins.lc 513:67-513:68 Type | 2668 | testdata/Builtins.lc 513:80-513:81 Type |
2669 | testdata/Builtins.lc 513:67-513:76 Type | 2669 | testdata/Builtins.lc 513:80-513:89 Type |
2670 | testdata/Builtins.lc 513:72-513:76 Type | 2670 | testdata/Builtins.lc 513:85-513:89 Type |
2671 | testdata/Builtins.lc 515:1-515:9 {a} -> {b:Nat} -> {c : a ~ VecScalar b Float} -> a->a | 2671 | testdata/Builtins.lc 515:1-515:9 {a} -> {b:Nat} -> {c : a ~ VecScalar b Float} -> a->a |
2672 | testdata/Builtins.lc 515:11-515:19 {a} -> {b:Nat} -> {c : a ~ VecScalar b Float} -> a->a | 2672 | testdata/Builtins.lc 515:11-515:19 {a} -> {b:Nat} -> {c : a ~ VecScalar b Float} -> a->a |
2673 | testdata/Builtins.lc 515:21-515:31 {a} -> {b:Nat} -> {c : a ~ VecScalar b Float} -> a->a | 2673 | testdata/Builtins.lc 515:21-515:31 {a} -> {b:Nat} -> {c : a ~ VecScalar b Float} -> a->a |
diff --git a/testdata/Prelude.out b/testdata/Prelude.out index 7dc75db8..b741d271 100644 --- a/testdata/Prelude.out +++ b/testdata/Prelude.out | |||
@@ -753,33 +753,33 @@ testdata/Prelude.lc 269:9-269:16 {a} -> {b : Signed (MatVecScalarElem a)} -> a- | |||
753 | testdata/Prelude.lc 269:9-269:18 V2 | 753 | testdata/Prelude.lc 269:9-269:18 V2 |
754 | testdata/Prelude.lc 269:17-269:18 V3 | 754 | testdata/Prelude.lc 269:17-269:18 V3 |
755 | testdata/Prelude.lc 273:3-273:5 {a} -> a -> a->Bool | 755 | testdata/Prelude.lc 273:3-273:5 {a} -> a -> a->Bool |
756 | testdata/Prelude.lc 273:10-273:22 {a} -> {b} -> {c : a ~ MatVecScalarElem b} -> b -> b->Bool | 756 | testdata/Prelude.lc 273:10-273:22 {a} -> {b} -> {c : b ~ MatVecScalarElem a} -> a -> a->Bool |
757 | testdata/Prelude.lc 273:10-273:24 V3->Bool | 757 | testdata/Prelude.lc 273:10-273:24 V3->Bool |
758 | testdata/Prelude.lc 273:10-273:26 Bool | 758 | testdata/Prelude.lc 273:10-273:26 Bool |
759 | testdata/Prelude.lc 273:23-273:24 V4 | 759 | testdata/Prelude.lc 273:23-273:24 V4 |
760 | testdata/Prelude.lc 273:25-273:26 V1 | 760 | testdata/Prelude.lc 273:25-273:26 V1 |
761 | testdata/Prelude.lc 274:3-274:4 {a} -> {b:Nat} -> {c : Num a} -> VecScalar b a -> VecScalar b a -> VecScalar b Bool | 761 | testdata/Prelude.lc 274:3-274:4 {a:Nat} -> {b} -> {c : Num b} -> VecScalar a b -> VecScalar a b -> VecScalar a Bool |
762 | testdata/Prelude.lc 274:9-274:21 {a} -> {b} -> {c:Nat} -> {d} -> {e : Num a} -> {f : b ~ VecScalar c a} -> {g : d ~ VecScalar c Bool} -> b -> b->d | 762 | testdata/Prelude.lc 274:9-274:21 {a} -> {b:Nat} -> {c} -> {d} -> {e : Num c} -> {f : a ~ VecScalar b c} -> {g : d ~ VecScalar b Bool} -> a -> a->d |
763 | testdata/Prelude.lc 274:9-274:23 VecScalar V1 V2 -> VecScalar V2 Bool | 763 | testdata/Prelude.lc 274:9-274:23 VecScalar V2 V1 -> VecScalar V3 Bool |
764 | testdata/Prelude.lc 274:9-274:25 VecScalar V1 Bool | 764 | testdata/Prelude.lc 274:9-274:25 VecScalar V2 Bool |
765 | testdata/Prelude.lc 274:22-274:23 V6 | 765 | testdata/Prelude.lc 274:22-274:23 V6 |
766 | testdata/Prelude.lc 274:24-274:25 V4 | 766 | testdata/Prelude.lc 274:24-274:25 V4 |
767 | testdata/Prelude.lc 275:3-275:5 {a} -> {b:Nat} -> {c : Num a} -> VecScalar b a -> VecScalar b a -> VecScalar b Bool | 767 | testdata/Prelude.lc 275:3-275:5 {a:Nat} -> {b} -> {c : Num b} -> VecScalar a b -> VecScalar a b -> VecScalar a Bool |
768 | testdata/Prelude.lc 275:10-275:27 {a} -> {b} -> {c:Nat} -> {d} -> {e : Num a} -> {f : b ~ VecScalar c a} -> {g : d ~ VecScalar c Bool} -> b -> b->d | 768 | testdata/Prelude.lc 275:10-275:27 {a} -> {b:Nat} -> {c} -> {d} -> {e : Num c} -> {f : a ~ VecScalar b c} -> {g : d ~ VecScalar b Bool} -> a -> a->d |
769 | testdata/Prelude.lc 275:10-275:29 VecScalar V1 V2 -> VecScalar V2 Bool | 769 | testdata/Prelude.lc 275:10-275:29 VecScalar V2 V1 -> VecScalar V3 Bool |
770 | testdata/Prelude.lc 275:10-275:31 VecScalar V1 Bool | 770 | testdata/Prelude.lc 275:10-275:31 VecScalar V2 Bool |
771 | testdata/Prelude.lc 275:28-275:29 V6 | 771 | testdata/Prelude.lc 275:28-275:29 V6 |
772 | testdata/Prelude.lc 275:30-275:31 V4 | 772 | testdata/Prelude.lc 275:30-275:31 V4 |
773 | testdata/Prelude.lc 276:3-276:5 {a} -> {b:Nat} -> {c : Num a} -> VecScalar b a -> VecScalar b a -> VecScalar b Bool | 773 | testdata/Prelude.lc 276:3-276:5 {a:Nat} -> {b} -> {c : Num b} -> VecScalar a b -> VecScalar a b -> VecScalar a Bool |
774 | testdata/Prelude.lc 276:10-276:30 {a} -> {b} -> {c:Nat} -> {d} -> {e : Num a} -> {f : b ~ VecScalar c a} -> {g : d ~ VecScalar c Bool} -> b -> b->d | 774 | testdata/Prelude.lc 276:10-276:30 {a} -> {b:Nat} -> {c} -> {d} -> {e : Num c} -> {f : a ~ VecScalar b c} -> {g : d ~ VecScalar b Bool} -> a -> a->d |
775 | testdata/Prelude.lc 276:10-276:32 VecScalar V1 V2 -> VecScalar V2 Bool | 775 | testdata/Prelude.lc 276:10-276:32 VecScalar V2 V1 -> VecScalar V3 Bool |
776 | testdata/Prelude.lc 276:10-276:34 VecScalar V1 Bool | 776 | testdata/Prelude.lc 276:10-276:34 VecScalar V2 Bool |
777 | testdata/Prelude.lc 276:31-276:32 V6 | 777 | testdata/Prelude.lc 276:31-276:32 V6 |
778 | testdata/Prelude.lc 276:33-276:34 V4 | 778 | testdata/Prelude.lc 276:33-276:34 V4 |
779 | testdata/Prelude.lc 277:3-277:4 {a} -> {b:Nat} -> {c : Num a} -> VecScalar b a -> VecScalar b a -> VecScalar b Bool | 779 | testdata/Prelude.lc 277:3-277:4 {a:Nat} -> {b} -> {c : Num b} -> VecScalar a b -> VecScalar a b -> VecScalar a Bool |
780 | testdata/Prelude.lc 277:9-277:24 {a} -> {b} -> {c:Nat} -> {d} -> {e : Num a} -> {f : b ~ VecScalar c a} -> {g : d ~ VecScalar c Bool} -> b -> b->d | 780 | testdata/Prelude.lc 277:9-277:24 {a} -> {b:Nat} -> {c} -> {d} -> {e : Num c} -> {f : a ~ VecScalar b c} -> {g : d ~ VecScalar b Bool} -> a -> a->d |
781 | testdata/Prelude.lc 277:9-277:26 VecScalar V1 V2 -> VecScalar V2 Bool | 781 | testdata/Prelude.lc 277:9-277:26 VecScalar V2 V1 -> VecScalar V3 Bool |
782 | testdata/Prelude.lc 277:9-277:28 VecScalar V1 Bool | 782 | testdata/Prelude.lc 277:9-277:28 VecScalar V2 Bool |
783 | testdata/Prelude.lc 277:25-277:26 V6 | 783 | testdata/Prelude.lc 277:25-277:26 V6 |
784 | testdata/Prelude.lc 277:27-277:28 V4 | 784 | testdata/Prelude.lc 277:27-277:28 V4 |
785 | testdata/Prelude.lc 280:3-280:5 Bool -> Bool->Bool | 785 | testdata/Prelude.lc 280:3-280:5 Bool -> Bool->Bool |
@@ -1048,7 +1048,7 @@ testdata/Prelude.lc 358:17-358:18 Float | |||
1048 | testdata/Prelude.lc 358:17-358:20 Float->Bool | 1048 | testdata/Prelude.lc 358:17-358:20 Float->Bool |
1049 | testdata/Prelude.lc 358:17-358:22 Bool | 1049 | testdata/Prelude.lc 358:17-358:22 Bool |
1050 | testdata/Prelude.lc 358:17-358:30 List V0 -> List V1 | 1050 | testdata/Prelude.lc 358:17-358:30 List V0 -> List V1 |
1051 | testdata/Prelude.lc 358:19-358:20 {a} -> {b:Nat} -> {c : Num a} -> VecScalar b a -> VecScalar b a -> VecScalar b Bool | 1051 | testdata/Prelude.lc 358:19-358:20 {a:Nat} -> {b} -> {c : Num b} -> VecScalar a b -> VecScalar a b -> VecScalar a Bool |
1052 | testdata/Prelude.lc 358:21-358:22 Float | 1052 | testdata/Prelude.lc 358:21-358:22 Float |
1053 | testdata/Prelude.lc 358:28-358:30 {a} -> List a | 1053 | testdata/Prelude.lc 358:28-358:30 {a} -> List a |
1054 | testdata/Prelude.lc 358:36-358:37 Float | 1054 | testdata/Prelude.lc 358:36-358:37 Float |
diff --git a/testdata/complex.out b/testdata/complex.out index 608be18c..444cab15 100644 --- a/testdata/complex.out +++ b/testdata/complex.out | |||
@@ -92,7 +92,7 @@ testdata/complex.lc 24:11-24:12 Float | |||
92 | testdata/complex.lc 24:11-24:14 Float->Bool | 92 | testdata/complex.lc 24:11-24:14 Float->Bool |
93 | testdata/complex.lc 24:11-24:19 Bool | 93 | testdata/complex.lc 24:11-24:19 Bool |
94 | testdata/complex.lc 24:11-24:59 Complex 'Polar -> Complex 'Polar | 94 | testdata/complex.lc 24:11-24:59 Complex 'Polar -> Complex 'Polar |
95 | testdata/complex.lc 24:13-24:14 {a} -> {b:Nat} -> {c : Num a} -> VecScalar b a -> VecScalar b a -> VecScalar b Bool | 95 | testdata/complex.lc 24:13-24:14 {a:Nat} -> {b} -> {c : Num b} -> VecScalar a b -> VecScalar a b -> VecScalar a Bool |
96 | testdata/complex.lc 24:16-24:19 Float | 96 | testdata/complex.lc 24:16-24:19 Float |
97 | testdata/complex.lc 24:37-24:42 Float -> Float -> Complex 'Polar | 97 | testdata/complex.lc 24:37-24:42 Float -> Float -> Complex 'Polar |
98 | testdata/complex.lc 24:37-24:44 Float -> Complex 'Polar | 98 | testdata/complex.lc 24:37-24:44 Float -> Complex 'Polar |
@@ -112,13 +112,13 @@ testdata/complex.lc 25:11-25:19 Bool | |||
112 | testdata/complex.lc 25:11-25:22 Bool->Bool | 112 | testdata/complex.lc 25:11-25:22 Bool->Bool |
113 | testdata/complex.lc 25:11-25:31 Bool | 113 | testdata/complex.lc 25:11-25:31 Bool |
114 | testdata/complex.lc 25:11-25:64 Complex 'Polar -> Complex 'Polar | 114 | testdata/complex.lc 25:11-25:64 Complex 'Polar -> Complex 'Polar |
115 | testdata/complex.lc 25:13-25:14 {a} -> {b:Nat} -> {c : Num a} -> VecScalar b a -> VecScalar b a -> VecScalar b Bool | 115 | testdata/complex.lc 25:13-25:14 {a:Nat} -> {b} -> {c : Num b} -> VecScalar a b -> VecScalar a b -> VecScalar a Bool |
116 | testdata/complex.lc 25:16-25:19 Float | 116 | testdata/complex.lc 25:16-25:19 Float |
117 | testdata/complex.lc 25:20-25:22 Bool -> Bool->Bool | 117 | testdata/complex.lc 25:20-25:22 Bool -> Bool->Bool |
118 | testdata/complex.lc 25:23-25:24 Float | 118 | testdata/complex.lc 25:23-25:24 Float |
119 | testdata/complex.lc 25:23-25:27 Float->Bool | 119 | testdata/complex.lc 25:23-25:27 Float->Bool |
120 | testdata/complex.lc 25:23-25:31 Bool | 120 | testdata/complex.lc 25:23-25:31 Bool |
121 | testdata/complex.lc 25:25-25:27 {a} -> {b:Nat} -> {c : Num a} -> VecScalar b a -> VecScalar b a -> VecScalar b Bool | 121 | testdata/complex.lc 25:25-25:27 {a:Nat} -> {b} -> {c : Num b} -> VecScalar a b -> VecScalar a b -> VecScalar a Bool |
122 | testdata/complex.lc 25:28-25:31 Float | 122 | testdata/complex.lc 25:28-25:31 Float |
123 | testdata/complex.lc 25:37-25:42 Float -> Float -> Complex 'Polar | 123 | testdata/complex.lc 25:37-25:42 Float -> Float -> Complex 'Polar |
124 | testdata/complex.lc 25:37-25:44 Float -> Complex 'Polar | 124 | testdata/complex.lc 25:37-25:44 Float -> Complex 'Polar |
@@ -142,13 +142,13 @@ testdata/complex.lc 26:11-26:19 Bool | |||
142 | testdata/complex.lc 26:11-26:22 Bool->Bool | 142 | testdata/complex.lc 26:11-26:22 Bool->Bool |
143 | testdata/complex.lc 26:11-26:31 Bool | 143 | testdata/complex.lc 26:11-26:31 Bool |
144 | testdata/complex.lc 26:11-26:64 Complex 'Polar -> Complex 'Polar | 144 | testdata/complex.lc 26:11-26:64 Complex 'Polar -> Complex 'Polar |
145 | testdata/complex.lc 26:13-26:14 {a} -> {b:Nat} -> {c : Num a} -> VecScalar b a -> VecScalar b a -> VecScalar b Bool | 145 | testdata/complex.lc 26:13-26:14 {a:Nat} -> {b} -> {c : Num b} -> VecScalar a b -> VecScalar a b -> VecScalar a Bool |
146 | testdata/complex.lc 26:16-26:19 Float | 146 | testdata/complex.lc 26:16-26:19 Float |
147 | testdata/complex.lc 26:20-26:22 Bool -> Bool->Bool | 147 | testdata/complex.lc 26:20-26:22 Bool -> Bool->Bool |
148 | testdata/complex.lc 26:23-26:24 Float | 148 | testdata/complex.lc 26:23-26:24 Float |
149 | testdata/complex.lc 26:23-26:26 Float->Bool | 149 | testdata/complex.lc 26:23-26:26 Float->Bool |
150 | testdata/complex.lc 26:23-26:31 Bool | 150 | testdata/complex.lc 26:23-26:31 Bool |
151 | testdata/complex.lc 26:25-26:26 {a} -> {b:Nat} -> {c : Num a} -> VecScalar b a -> VecScalar b a -> VecScalar b Bool | 151 | testdata/complex.lc 26:25-26:26 {a:Nat} -> {b} -> {c : Num b} -> VecScalar a b -> VecScalar a b -> VecScalar a Bool |
152 | testdata/complex.lc 26:28-26:31 Float | 152 | testdata/complex.lc 26:28-26:31 Float |
153 | testdata/complex.lc 26:37-26:42 Float -> Float -> Complex 'Polar | 153 | testdata/complex.lc 26:37-26:42 Float -> Float -> Complex 'Polar |
154 | testdata/complex.lc 26:37-26:44 Float -> Complex 'Polar | 154 | testdata/complex.lc 26:37-26:44 Float -> Complex 'Polar |
@@ -178,7 +178,7 @@ testdata/complex.lc 27:20-27:22 Bool -> Bool->Bool | |||
178 | testdata/complex.lc 27:23-27:24 Float | 178 | testdata/complex.lc 27:23-27:24 Float |
179 | testdata/complex.lc 27:23-27:27 Float->Bool | 179 | testdata/complex.lc 27:23-27:27 Float->Bool |
180 | testdata/complex.lc 27:23-27:31 Bool | 180 | testdata/complex.lc 27:23-27:31 Bool |
181 | testdata/complex.lc 27:25-27:27 {a} -> {b:Nat} -> {c : Num a} -> VecScalar b a -> VecScalar b a -> VecScalar b Bool | 181 | testdata/complex.lc 27:25-27:27 {a:Nat} -> {b} -> {c : Num b} -> VecScalar a b -> VecScalar a b -> VecScalar a Bool |
182 | testdata/complex.lc 27:28-27:31 Float | 182 | testdata/complex.lc 27:28-27:31 Float |
183 | testdata/complex.lc 27:37-27:42 Float -> Float -> Complex 'Polar | 183 | testdata/complex.lc 27:37-27:42 Float -> Float -> Complex 'Polar |
184 | testdata/complex.lc 27:37-27:44 Float -> Complex 'Polar | 184 | testdata/complex.lc 27:37-27:44 Float -> Complex 'Polar |
@@ -202,7 +202,7 @@ testdata/complex.lc 28:20-28:22 Bool -> Bool->Bool | |||
202 | testdata/complex.lc 28:23-28:24 Float | 202 | testdata/complex.lc 28:23-28:24 Float |
203 | testdata/complex.lc 28:23-28:26 Float->Bool | 203 | testdata/complex.lc 28:23-28:26 Float->Bool |
204 | testdata/complex.lc 28:23-28:31 Bool | 204 | testdata/complex.lc 28:23-28:31 Bool |
205 | testdata/complex.lc 28:25-28:26 {a} -> {b:Nat} -> {c : Num a} -> VecScalar b a -> VecScalar b a -> VecScalar b Bool | 205 | testdata/complex.lc 28:25-28:26 {a:Nat} -> {b} -> {c : Num b} -> VecScalar a b -> VecScalar a b -> VecScalar a Bool |
206 | testdata/complex.lc 28:28-28:31 Float | 206 | testdata/complex.lc 28:28-28:31 Float |
207 | testdata/complex.lc 28:37-28:42 Float -> Float -> Complex 'Polar | 207 | testdata/complex.lc 28:37-28:42 Float -> Float -> Complex 'Polar |
208 | testdata/complex.lc 28:37-28:44 Float -> Complex 'Polar | 208 | testdata/complex.lc 28:37-28:44 Float -> Complex 'Polar |
@@ -381,5 +381,5 @@ testdata/complex.lc 145:12-145:31 Bool | |||
381 | testdata/complex.lc 145:17-145:25 Complex V0 | 381 | testdata/complex.lc 145:17-145:25 Complex V0 |
382 | testdata/complex.lc 145:18-145:22 {a:Repr} -> Complex a -> Complex a | 382 | testdata/complex.lc 145:18-145:22 {a:Repr} -> Complex a -> Complex a |
383 | testdata/complex.lc 145:23-145:24 V6 | 383 | testdata/complex.lc 145:23-145:24 V6 |
384 | testdata/complex.lc 145:26-145:27 {a} -> {b:Nat} -> {c : Num a} -> VecScalar b a -> VecScalar b a -> VecScalar b Bool | 384 | testdata/complex.lc 145:26-145:27 {a:Nat} -> {b} -> {c : Num b} -> VecScalar a b -> VecScalar a b -> VecScalar a Bool |
385 | testdata/complex.lc 145:28-145:31 Float | 385 | testdata/complex.lc 145:28-145:31 Float |