@@ -13,7 +13,7 @@ import Idris.Imports
13import Idris.Package.Common
13import Idris.Package.Common
14import Idris.Parser.Helpers (IdrisInnerParser, MonadicParsing, eol, iName, identifier, isEol,
14import Idris.Parser.Helpers (IdrisInnerParser, MonadicParsing, eol, iName, identifier, isEol,
15 lchar, packageName, parseErrorDoc, reserved,
15 lchar, packageName, parseErrorDoc, reserved,
16− runparser, someSpace', stringLiteral)
16+ runparser, someSpace, stringLiteral)
18import Control.Applicative
18import Control.Applicative
19import Control.Monad.State.Strict
19import Control.Monad.State.Strict
@@ -48,7 +48,7 @@ pPkg :: PParser PkgDesc
49 reserved "package"
49 reserved "package"
50 p <- pPkgName
50 p <- pPkgName
51− someSpace'
51+ someSpace
52 modify $ \st -> st { pkgname = p }
52 modify $ \st -> st { pkgname = p }
53 some pClause
53 some pClause
@@ -99,10 +99,10 @@ filename = (do
99 "filename must contain no directory component"
99 "filename must contain no directory component"
101textUntilEol :: MonadicParsing m => m String
101textUntilEol :: MonadicParsing m => m String
102−textUntilEol = many (P.satisfy (not . isEol)) <* eol <* someSpace'
102+textUntilEol = many (P.satisfy (not . isEol)) <* eol <* someSpace
104clause :: String -> PParser a -> (PkgDesc -> a -> PkgDesc) -> PParser ()
104clause :: String -> PParser a -> (PkgDesc -> a -> PkgDesc) -> PParser ()
105−clause name p f = do value <- reserved name *> lchar '=' *> p <* someSpace'
105+clause name p f = do value <- reserved name *> lchar '=' *> p <* someSpace
106 modify $ \st -> f st value
106 modify $ \st -> f st value
108commaSep :: MonadicParsing m => m a -> m [a]
108commaSep :: MonadicParsing m => m a -> m [a]
@@ -113,7 +113,7 @@ pClause = clause "executable" filename (\st v -> st { execout = Just v })
113 <|> clause "main" (fst <$> iName []) (\st v -> st { idris_main = Just v })
113 <|> clause "main" (fst <$> iName []) (\st v -> st { idris_main = Just v })
114 <|> clause "sourcedir" (fst <$> identifier) (\st v -> st { sourcedir = v })
114 <|> clause "sourcedir" (fst <$> identifier) (\st v -> st { sourcedir = v })
115 <|> clause "opts" (pureArgParser . words . fst <$> stringLiteral) (\st v -> st { idris_opts = v ++ idris_opts st })
115 <|> clause "opts" (pureArgParser . words . fst <$> stringLiteral) (\st v -> st { idris_opts = v ++ idris_opts st })
116− <|> clause "pkgs" (commaSep (pPkgName <* someSpace')) (\st ps ->
116+ <|> clause "pkgs" (commaSep (pPkgName <* someSpace)) (\st ps ->
117 let pkgs = pureArgParser $ concatMap (\x -> ["-p", show x]) ps
117 let pkgs = pureArgParser $ concatMap (\x -> ["-p", show x]) ps
118 in st { pkgdeps = ps `union` pkgdeps st
118 in st { pkgdeps = ps `union` pkgdeps st
119 , idris_opts = pkgs ++ idris_opts st })
119 , idris_opts = pkgs ++ idris_opts st })