@@ -12,9 +12,8 @@ import Idris.CmdOptions
1212import Idris.Imports
1313import Idris.Package.Common
1414import Idris.Parser.Helpers (IdrisInnerParser, MonadicParsing, eol, iName,
15− identifier, isEol, lchar, multiLineComment,
16− packageName, parseErrorDoc, reserved, runparser,
17− simpleWhiteSpace, singleLineComment)
15+ identifier, isEol, lchar, packageName,
16+ parseErrorDoc, reserved, runparser, someSpace')
1817
1918import Control.Applicative
2019import Control.Monad.State.Strict
@@ -43,7 +42,7 @@ instance {-# OVERLAPPING #-} P.DeltaParsing PParser where
4342#endif
4443
4544instance {-# OVERLAPPING #-} P.TokenParsing PParser where
46− someSpace = many (simpleWhiteSpace <|> singleLineComment <|> multiLineComment) *> pure ()
45+ someSpace = someSpace'
4746
4847
4948parseDesc :: FilePath -> IO PkgDesc
@@ -66,7 +65,7 @@ pPkg :: PParser PkgDesc
6665pPkg = do
6766 reserved "package"
6867 p <- pPkgName
69− P.someSpace
68+ someSpace'
7069 modify $ \st -> st { pkgname = p }
7170 some pClause
7271 st <- get
@@ -119,10 +118,10 @@ filename = (do
119118 "filename must contain no directory component"
120119
121120textUntilEol :: MonadicParsing m => m String
122−textUntilEol = many (P.satisfy (not . isEol)) <* eol <* P.someSpace
121+textUntilEol = many (P.satisfy (not . isEol)) <* eol <* someSpace'
123122
124123clause :: String -> PParser a -> (PkgDesc -> a -> PkgDesc) -> PParser ()
125−clause name p f = do value <- reserved name *> lchar '=' *> p <* P.someSpace
124+clause name p f = do value <- reserved name *> lchar '=' *> p <* someSpace'
126125 modify $ \st -> f st value
127126
128127commaSep :: MonadicParsing m => m a -> m [a]
@@ -133,7 +132,7 @@ pClause = clause "executable" filename (\st v -> st { execout = Just v })
133132 <|> clause "main" (fst <$> iName []) (\st v -> st { idris_main = Just v })
134133 <|> clause "sourcedir" (fst <$> identifier) (\st v -> st { sourcedir = v })
135134 <|> clause "opts" (pureArgParser . words <$> P.stringLiteral) (\st v -> st { idris_opts = v ++ idris_opts st })
136− <|> clause "pkgs" (commaSep (pPkgName <* P.someSpace)) (\st ps ->
135+ <|> clause "pkgs" (commaSep (pPkgName <* someSpace')) (\st ps ->
137136 let pkgs = pureArgParser $ concatMap (\x -> ["-p", show x]) ps
138137 in st { pkgdeps = ps `union` pkgdeps st
139138 , idris_opts = pkgs ++ idris_opts st })