@@ -45,8 +45,12 @@ instance Show SrcPos where
45instance Show SrcSpan where
45instance Show SrcSpan where
46 show span =
46 show span =
47 case span of
47 case span of
48− Span start end _ -> show start ++ " to " ++ show end
49+ Span start end _ ->
49− NoSpan str -> str
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)
51instance Show e => Show (Located e) where
55instance Show e => Show (Located e) where
52 show (L s e) = "L (" ++ show s ++ ") (" ++ show e ++ ")"
56 show (L s e) = "L (" ++ show s ++ ") (" ++ show e ++ ")"