on master help sign in
PParser.hs: Parse executable clause argument as filename

Previously, it was parsed as an iName, AKA a possibly-namespaced identifier. This meant you could have dots in your executable's name, but no hyphens! See: #2721: Allow dashes in package names (https://github.com/idris-lang/Idris-dev/issues/2721)

commitb6a8a95b7c85827c62ec3928b065c2df418aa5f8 authorJeremy W. Sherman <jeremyw.sherman@gmail.com> dateSun 11 Oct 2015, 23:53 (11 years ago) parentc772bf5
1 file changed+2−2
src/Pkg/PParser.hs+2−2
src/Pkg/PParser.hs+2−2
@@ -72,9 +72,9 @@ filename = try $ (token $ stringLiteral <|> (fst <$> identifier)) <?> "filename"
7272
7373pClause :: PParser ()
7474pClause = do reserved "executable"; lchar '=';
75− exec <- fst <$> iName []
75+ exec <- filename
7676 st <- get
77− put (st { execout = Just (show exec) })
77+ put (st { execout = Just exec })
7878 <|> do reserved "main"; lchar '=';
7979 main <- fst <$> iName []
8080 st <- get