@@ -1271,12 +1271,18 @@ parseImports fname input
12711271
12721272-- | There should be a better way of doing this...
12731273findFC :: Doc -> (FC, String)
1274−findFC x = let s = show (plain x) in
1275− case span (/= ':') s of
1276− (failname, ':':rest) -> case span isDigit rest of
1277− (line, ':':rest') -> case span isDigit rest' of
1278− (col, ':':msg) -> let pos = (read line, read col) in
1279− (FC failname pos pos, msg)
1274+findFC x = let s = show (plain x) in findFC' s
1275+ where findFC' s = case span (/= ':') s of
1276+ -- Horrid kludge to prevent crashes on Windows
1277+ (prefix, ':':'\\':rest) ->
1278+ case findFC' rest of
1279+ (NoFC, msg) -> (NoFC, msg)
1280+ (FileFC f, msg) -> (FileFC (prefix ++ ":\\" ++ f), msg)
1281+ (FC f start end, msg) -> (FC (prefix ++ ":\\" ++ f) start end, msg)
1282+ (failname, ':':rest) -> case span isDigit rest of
1283+ (line, ':':rest') -> case span isDigit rest' of
1284+ (col, ':':msg) -> let pos = (read line, read col) in
1285+ (FC failname pos pos, msg)
12801286
12811287-- | Check if the coloring matches the options and corrects if necessary
12821288fixColour :: Bool -> ANSI.Doc -> ANSI.Doc