summaryrefslogtreecommitdiff
path: root/src/LambdaCube/Compiler/Infer.hs
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-05-04 10:37:44 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-05-04 10:37:44 +0200
commit4fd500adc5a8eee72caca044bac5fd11ef10c6b5 (patch)
tree9c5267c477a746bbef2ba9eb360b7606434675b5 /src/LambdaCube/Compiler/Infer.hs
parent0dc09e81832aa1495ef9f213bf091f4a1620ab05 (diff)
fix pretty print
Diffstat (limited to 'src/LambdaCube/Compiler/Infer.hs')
-rw-r--r--src/LambdaCube/Compiler/Infer.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/LambdaCube/Compiler/Infer.hs b/src/LambdaCube/Compiler/Infer.hs
index 89348420..5ff71a52 100644
--- a/src/LambdaCube/Compiler/Infer.hs
+++ b/src/LambdaCube/Compiler/Infer.hs
@@ -624,14 +624,14 @@ mkInfoItem (RangeSI r) i = [Info r i]
624mkInfoItem _ _ = mempty 624mkInfoItem _ _ = mempty
625 625
626listAllInfos m = h "trace" (listTraceInfos m) 626listAllInfos m = h "trace" (listTraceInfos m)
627 ++ h "tooltips" [ nest 4 $ shortForm (pShow r) <$$> hsep (intersperse "|" is) | (r, is) <- listTypeInfos m ] 627 ++ h "tooltips" [ nest 4 $ shortForm $ pShow r <$$> hsep (intersperse "|" is) | (r, is) <- listTypeInfos m ]
628 ++ h "warnings" [ pShow w | ParseWarning w <- m ] 628 ++ h "warnings" [ pShow w | ParseWarning w <- m ]
629 where 629 where
630 h x [] = [] 630 h x [] = []
631 h x xs = ("------------" <+> x) : xs 631 h x xs = ("------------" <+> x) : xs
632 632
633listTraceInfos m = [DResetFreshNames $ pShow i | i <- m, case i of Info{} -> False; ParseWarning{} -> False; _ -> True] 633listTraceInfos m = [DResetFreshNames $ pShow i | i <- m, case i of Info{} -> False; ParseWarning{} -> False; _ -> True]
634listTypeInfos m = Map.toList $ Map.unionsWith (<>) [Map.singleton r [i] | Info r i <- m] 634listTypeInfos m = Map.toList $ Map.unionsWith (<>) [Map.singleton r [DResetFreshNames i] | Info r i <- m]
635 635
636-------------------------------------------------------------------------------- inference for statements 636-------------------------------------------------------------------------------- inference for statements
637 637