Skip to content

Commit

Permalink
Fix PackageConfig FieldGrammar
Browse files Browse the repository at this point in the history
  • Loading branch information
jgotoh committed Jan 11, 2024
1 parent 472d664 commit 8a6f3fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ packageConfigFieldGrammar =
<*> optionalFieldDef "static" L.packageConfigStaticLib mempty
<*> optionalFieldDef "executable-dynamic" L.packageConfigDynExe mempty
<*> optionalFieldDef "executable-static" L.packageConfigFullyStaticExe mempty
<*> optionalFieldDef "profilin" L.packageConfigProf mempty
<*> optionalFieldDef "profiling" L.packageConfigProf mempty
<*> optionalFieldDef "library-profiling" L.packageConfigProfLib mempty
<*> optionalFieldDef "executable-profiling" L.packageConfigProfExe mempty
<*> optionalFieldDef "profiling-detail" L.packageConfigProfDetail mempty
Expand Down Expand Up @@ -163,8 +163,8 @@ packageConfigFieldGrammar =
<*> optionalFieldDefAla "haddock-lib" (alaFlag Token) L.packageConfigHaddockLib mempty
<*> optionalFieldDefAla "haddock-output-dir" (alaFlag FilePathNT) L.packageConfigHaddockOutputDir mempty
<*> optionalFieldDef "haddock-for-hackage" L.packageConfigHaddockForHackage mempty
<*> optionalFieldDef "human-log" L.packageConfigTestHumanLog mempty
<*> optionalFieldDef "machine-log" L.packageConfigTestMachineLog mempty
<*> optionalFieldDef "test-log" L.packageConfigTestHumanLog mempty
<*> optionalFieldDef "test-machine-log" L.packageConfigTestMachineLog mempty
<*> optionalFieldDef "test-show-details" L.packageConfigTestShowDetails mempty
<*> optionalFieldDef "test-keep-tix-files" L.packageConfigTestKeepTix mempty
<*> optionalFieldDefAla "test-wrapper" (alaFlag FilePathNT) L.packageConfigTestWrapper mempty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ readProgramName suffix programDb fieldName =

parseProgramName :: FieldSuffix -> FieldName -> Maybe String
parseProgramName suffix fieldName = case runParsecParser parser' "<parseProgramName>" fieldNameStream of
Left err -> trace (show err) Nothing -- TODO should parseWarning Unknown Field fieldName
Left _ -> Nothing
Right str -> Just str
where
parser' = P.manyTill P.anyChar (P.try ((P.string suffix)) <* P.eof)
Expand Down

0 comments on commit 8a6f3fd

Please sign in to comment.