@@ -13,9 +13,10 @@ import Idris.Imports
1313import Idris.Options (Opt)
1414import Idris.Package.Common
1515import Idris.Parser (moduleName)
16−import Idris.Parser.Helpers (Parser, Parsing, eol, iName, identifier, isEol,
17− lchar, packageName, parseErrorDoc, reserved,
18− runparser, someSpace, stringLiteral)
16+import Idris.Parser.Helpers (Parser, Parsing, eol, iName, identifier,
17+ identifierWithExtraChars, isEol, lchar,
18+ packageName, parseErrorDoc, reserved, runparser,
19+ someSpace, stringLiteral)
1920
2021import Control.Applicative
2122import Control.Monad.State.Strict
@@ -119,6 +120,9 @@ pOptions = do
119120 Opts.Failure e -> fail $ fst $ Opts.renderFailure e ""
120121 _ -> fail "Unexpected error"
121122
123+libIdentifier :: Parsing m => m String
124+libIdentifier = identifierWithExtraChars "_'-."
125+
122126pClause :: PParser ()
123127pClause = clause "executable" filename (\st v -> st { execout = Just v })
124128 <|> clause "main" (iName []) (\st v -> st { idris_main = Just v })
@@ -129,7 +133,7 @@ pClause = clause "executable" filename (\st v -> st { execout = Just v })
129133 in st { pkgdeps = ps `union` pkgdeps st
130134 , idris_opts = pkgs ++ idris_opts st })
131135 <|> clause "modules" (commaSep moduleName) (\st v -> st { modules = modules st ++ v })
132− <|> clause "libs" (commaSep identifier) (\st v -> st { libdeps = libdeps st ++ v })
136+ <|> clause "libs" (commaSep libIdentifier) (\st v -> st { libdeps = libdeps st ++ v })
133137 <|> clause "objs" (commaSep identifier) (\st v -> st { objs = objs st ++ v })
134138 <|> clause "makefile" (iName []) (\st v -> st { makefile = Just (show v) })
135139 <|> clause "tests" (commaSep (iName [])) (\st v -> st { idris_tests = idris_tests st ++ v })
@@ -142,3 +146,4 @@ pClause = clause "executable" filename (\st v -> st { execout = Just v })
142146 <|> clause "brief" stringLiteral (\st v -> st { pkgbrief = Just v })
143147 <|> clause "author" textUntilEol (\st v -> st { pkgauthor = Just v })
144148 <|> clause "maintainer" textUntilEol (\st v -> st { pkgmaintainer = Just v })
149+