@@ -93,6 +93,12 @@ delabTy' ist imps tm fullname = de [] imps tm
9393 imp (PConstraint p l _ d) arg = PConstraint p l arg d
9494 imp (PTacImplicit p l n sc _ d) arg = PTacImplicit p l n sc arg d
9595
96+
97+indented text = boxIt '\n' $ unlines $ map ('\t':) $ lines text where
98+ boxIt c text = (c:text) ++ if last text == c
99+ then ""
100+ else [c]
101+
96102pshow :: IState -> Err -> String
97103pshow i (Msg s) = s
98104pshow i (InternalMsg s) = "INTERNAL ERROR: " ++ show s ++
@@ -101,25 +107,26 @@ pshow i (InternalMsg s) = "INTERNAL ERROR: " ++ show s ++
101107pshow i (CantUnify _ x y e sc s)
102108 = let imps = opt_showimp (idris_options i) in
103109 let colour = idris_colourRepl i in
104− "Can't unify " ++ showImp (Just i) imps colour (delab i x)
105− ++ " with " ++ showImp (Just i) imps colour (delab i y) ++
110+ "Can't unify" ++ indented (showImp (Just i) imps colour (delab i x))
111+ ++ "with" ++ indented (showImp (Just i) imps colour (delab i y)) ++
106112-- " (" ++ show x ++ " and " ++ show y ++ ") " ++
107113 case e of
108114 Msg "" -> ""
109− _ -> "\n\nSpecifically:\n\t" ++ pshow i e ++
110− if (opt_errContext (idris_options i)) then showSc i sc else ""
115+ _ -> "\nSpecifically:" ++
116+ indented (pshow i e) ++
117+ if (opt_errContext (idris_options i)) then showSc i sc else ""
111118pshow i (CantConvert x y env)
112119 = let imps = opt_showimp (idris_options i) in
113120 let colour = idris_colourRepl i in
114− "Can't convert " ++ showImp (Just i) imps colour (delab i x) ++ " with "
115− ++ showImp (Just i) imps colour (delab i y) ++
121+ "Can't convert" ++ indented (showImp (Just i) imps colour (delab i x)) ++ "with"
122+ ++ indented (showImp (Just i) imps colour (delab i y)) ++
116123 if (opt_errContext (idris_options i)) then showSc i env else ""
117124pshow i (UnifyScope n out tm env)
118125 = let imps = opt_showimp (idris_options i) in
119126 let colour = idris_colourRepl i in
120− "Can't unify " ++ show n ++ " with "
121− ++ showImp (Just i) imps colour (delab i tm) ++ " as " ++ show out ++
122− " is not in scope" ++
127+ "Can't unify" ++ indented (show n) ++ "with"
128+ ++ indented (showImp (Just i) imps colour (delab i tm)) ++ "as" ++
129+ indented (show out) ++ "is not in scope" ++
123130 if (opt_errContext (idris_options i)) then showSc i env else ""
124131pshow i (CantInferType t)
125132 = "Can't infer type for " ++ t