@@ -83,13 +83,14 @@ pshow i (CantUnify _ x y e sc s)
8383 case e of
8484 Msg "" -> ""
8585 _ -> "\n\nSpecifically:\n\t" ++ pshow i e ++
86− if (opt_errContext (idris_options i)) then showSc sc else ""
87− where showSc [] = ""
88− showSc xs = "\n\nIn context:\n" ++ showSep "\n" (map showVar (reverse xs))
89− showVar (x, y) = "\t" ++ showbasic x ++ " : " ++ show (delab i y)
90− showbasic n@(UN _) = show n
91− showbasic (MN _ s) = s
92− showbasic (NS n s) = showSep "." (reverse s) ++ "." ++ showbasic n
86+ if (opt_errContext (idris_options i)) then showSc i sc else ""
87+pshow i (CantConvert x y env)
88+ = "Can't unify " ++ show (delab i x) ++ " with " ++ show (delab i y) ++
89+ if (opt_errContext (idris_options i)) then showSc i env else ""
90+pshow i (InfiniteUnify x tm env)
91+ = "Unifying " ++ showbasic x ++ " and " ++ show (delab i tm) ++
92+ " would lead to infinite value" ++
93+ if (opt_errContext (idris_options i)) then showSc i env else ""
9394pshow i (NotInjective p x y) = "Can't verify injectivity of " ++ show (delab i p) ++
9495 " when unifying " ++ show (delab i x) ++ " and " ++
9596 show (delab i y)
@@ -103,3 +104,10 @@ pshow i ProgramLineComment = "Program line next to comment"
103104pshow i (Inaccessible n) = show n ++ " is not an accessible pattern variable"
104105pshow i (At f e) = show f ++ ":" ++ pshow i e
105106
107+showSc i [] = ""
108+showSc i xs = "\n\nIn context:\n" ++ showSep "\n" (map showVar (reverse xs))
109+ where showVar (x, y) = "\t" ++ showbasic x ++ " : " ++ show (delab i y)
110+
111+showbasic n@(UN _) = show n
112+showbasic (MN _ s) = s
113+showbasic (NS n s) = showSep "." (reverse s) ++ "." ++ showbasic n