Merge pull request #2239 from melted/trailing
Trim trailing spaces when getting a file name from the REPL
commit501372f0dc942d305448026af9ebf4b2bbd2c3b6
authorNiklas Larsson <metaniklas@gmail.com>
dateThu 7 May 2015, 22:26 (11 years ago)
parent375c986160e7e1
src/Idris/Chaser.hs+1−1
@@ -71,7 +71,7 @@ extractFileName ('"':xs) = takeWhile (/= '"') xs
7171extractFileName ('\'':xs) = takeWhile (/= '\'') xs
7272extractFileName x = build x []
7373 where
74− build [] acc = reverse acc
74+ build [] acc = reverse $ dropWhile (== ' ') acc
7575 build ('\\':' ':xs) acc = build xs (' ':acc)
7676 build (x:xs) acc = build xs (x:acc)
7777