X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FSrcLoc.lhs;h=e1a2a43567efcf9b9907f096708e0c3eada91c41;hb=c86161c5cf11de77e911fcb9e1e2bd1f8bd80b42;hp=e213befc839f045bb0fe872005444a7c81e2753e;hpb=f41e3ea766c340c49b829eabfdea7c77bda2a95e;p=ghc-hetmet.git diff --git a/compiler/basicTypes/SrcLoc.lhs b/compiler/basicTypes/SrcLoc.lhs index e213bef..e1a2a43 100644 --- a/compiler/basicTypes/SrcLoc.lhs +++ b/compiler/basicTypes/SrcLoc.lhs @@ -138,7 +138,7 @@ srcLocCol _other = panic "srcLocCol: unknown col" -- character in any other case advanceSrcLoc :: SrcLoc -> Char -> SrcLoc advanceSrcLoc (SrcLoc f l _) '\n' = SrcLoc f (l + 1) 1 -advanceSrcLoc (SrcLoc f l c) '\t' = SrcLoc f l ((((c `shiftR` 3) + 1) +advanceSrcLoc (SrcLoc f l c) '\t' = SrcLoc f l (((((c - 1) `shiftR` 3) + 1) `shiftL` 3) + 1) advanceSrcLoc (SrcLoc f l c) _ = SrcLoc f l (c + 1) advanceSrcLoc loc _ = loc -- Better than nothing