@@ -65,6 +65,16 @@ getModuleFiles ts = nub $ execState (modList ts) [] where
6565 then getSrc x : updateToSrc path xs
6666 else x : updateToSrc path xs
6767
68+-- Strip quotes and the backslash escapes that Haskeline adds
69+extractFileName :: String -> String
70+extractFileName ('"':xs) = takeWhile (/= '"') xs
71+extractFileName ('\'':xs) = takeWhile (/= '\'') xs
72+extractFileName x = build x []
73+ where
74+ build [] acc = reverse acc
75+ build ('\\':' ':xs) acc = build xs (' ':acc)
76+ build (x:xs) acc = build xs (x:acc)
77+
6878getIModTime (IBC i _) = getModificationTime i
6979getIModTime (IDR i) = getModificationTime i
7080getIModTime (LIDR i) = getModificationTime i
@@ -79,7 +89,7 @@ buildTree built fp = btree [] fp
7989 where
8090 btree done f =
8191 do i <- getIState
82− let file = takeWhile (/= ' ') f
92+ let file = extractFileName f
8393 iLOG $ "CHASING " ++ show file
8494 ibcsd <- valIBCSubDir i
8595 ids <- allImportDirs