@@ -45,8 +45,12 @@ instance Show SrcPos where
4545instance Show SrcSpan where
4646 show span =
4747 case span of
48− Span start end _ -> show start ++ " to " ++ show end
49− NoSpan str -> str
48+ NoSpan _ -> ""
49+ Span start end _ ->
50+ case line start == line end of
51+ False -> "between lines " ++ show (line start) ++ " and " ++ show (line end)
52+ True -> "line " ++ show (line end) ++ ", column " ++
53+ show (column start) ++ " to " ++ show (column end)
5054
5155instance Show e => Show (Located e) where
5256 show (L s e) = "L (" ++ show s ++ ") (" ++ show e ++ ")"