summaryrefslogtreecommitdiff
path: root/src/LambdaCube/Compiler/Infer.hs
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-04-28 02:01:29 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-04-28 02:01:29 +0200
commit7e9105793bd0d5ff7197a5860ac5339dea677e0e (patch)
treefa003b495b78a8b5cb5e6505c72a32bc6e80e1b3 /src/LambdaCube/Compiler/Infer.hs
parenta23ba9fced413f1b63640ba9bd81686a7eb59ee1 (diff)
switch to ansi-wl-pprint
Diffstat (limited to 'src/LambdaCube/Compiler/Infer.hs')
-rw-r--r--src/LambdaCube/Compiler/Infer.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/LambdaCube/Compiler/Infer.hs b/src/LambdaCube/Compiler/Infer.hs
index 81deaaa0..492e9a69 100644
--- a/src/LambdaCube/Compiler/Infer.hs
+++ b/src/LambdaCube/Compiler/Infer.hs
@@ -1188,10 +1188,10 @@ recheck' msg' e (x, xt) = (recheck_ "main" (checkEnv e) (x, xt), xt)
1188 checkApps s acc zt f _ t [] 1188 checkApps s acc zt f _ t []
1189 | t == zt = f $ reverse acc 1189 | t == zt = f $ reverse acc
1190 | otherwise = 1190 | otherwise =
1191 error_ $ "checkApps' " ++ s ++ " " ++ msg ++ "\n" ++ showEnvExp te{-todo-} (t, TType) ++ "\n\n" ++ showEnvExp te (zt, TType) 1191 error $ "checkApps' " ++ s ++ " " ++ msg ++ "\n" ++ showEnvExp te{-todo-} (t, TType) ++ "\n\n" ++ showEnvExp te (zt, TType)
1192 checkApps s acc zt f te t@(unfixlabel -> Pi h x y) (b_: xs) = checkApps (s++"+") (b: acc) zt f te (appTy t b) xs where b = recheck_ "checkApps" te (b_, x) 1192 checkApps s acc zt f te t@(unfixlabel -> Pi h x y) (b_: xs) = checkApps (s++"+") (b: acc) zt f te (appTy t b) xs where b = recheck_ "checkApps" te (b_, x)
1193 checkApps s acc zt f te t _ = 1193 checkApps s acc zt f te t _ =
1194 error_ $ "checkApps " ++ s ++ " " ++ msg ++ "\n" ++ showEnvExp te{-todo-} (t, TType) ++ "\n\n" ++ showEnvExp e (x, xt) 1194 error $ "checkApps " ++ s ++ " " ++ msg ++ "\n" ++ showEnvExp te{-todo-} (t, TType) ++ "\n\n" ++ showEnvExp e (x, xt)
1195 1195
1196-- Ambiguous: (Int ~ F a) => Int 1196-- Ambiguous: (Int ~ F a) => Int
1197-- Not ambiguous: (Show a, a ~ F b) => b 1197-- Not ambiguous: (Show a, a ~ F b) => b
@@ -1272,8 +1272,8 @@ instance NFData Info
1272instance Show Info where 1272instance Show Info where
1273 show = \case 1273 show = \case
1274 Info r s -> ppShow r ++ " " ++ s 1274 Info r s -> ppShow r ++ " " ++ s
1275 IType a b -> a ++ " :: " ++ correctEscs b 1275 IType a b -> a ++ " :: " ++ b
1276 ITrace i s -> i ++ ": " ++ correctEscs s 1276 ITrace i s -> i ++ ": " ++ s
1277 IError e -> "!" ++ show e 1277 IError e -> "!" ++ show e
1278 ParseWarning w -> show w 1278 ParseWarning w -> show w
1279 1279
@@ -1392,7 +1392,7 @@ mkELet n x xt = {-(if null vs then id else trace_ $ "mkELet " ++ show (length vs
1392 term = pmLabel fn vs 0 [] $ getFix x 0 1392 term = pmLabel fn vs 0 [] $ getFix x 0
1393 1393
1394 getFix (Lam z) i = Lam $ getFix z (i+1) 1394 getFix (Lam z) i = Lam $ getFix z (i+1)
1395 getFix (TFun FprimFix _ [t, Lam f]) i = (if null vs then id else trace_ "!local rec") $ subst 0 (foldl app_ term (downTo 0 i)) f 1395 getFix (TFun FprimFix _ [t, Lam f]) i = subst 0 (foldl app_ term (downTo 0 i)) f
1396 getFix x _ = x 1396 getFix x _ = x
1397 1397
1398 1398
@@ -1456,7 +1456,7 @@ instance PShow (CEnv Exp) where
1456 pShowPrec _ = showDoc_ . mkDoc False False 1456 pShowPrec _ = showDoc_ . mkDoc False False
1457 1457
1458instance PShow Env where 1458instance PShow Env where
1459 pShowPrec _ e = showDoc_ $ envDoc e $ shAtom $ underlined "<<HERE>>" 1459 pShowPrec _ e = showDoc_ $ envDoc e $ epar $ shAtom "<<HERE>>"
1460 1460
1461showEnvExp :: Env -> ExpType -> String 1461showEnvExp :: Env -> ExpType -> String
1462showEnvExp e c = showDoc $ envDoc e $ epar $ mkDoc False False c 1462showEnvExp e c = showDoc $ envDoc e $ epar $ mkDoc False False c