File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -792,7 +792,8 @@ getPackageModulesFromGhcDump = do
792792 (" error parsing ghc package dump: " ++ errorBundlePretty e)
793793 >> pure MonoidalMap. empty
794794
795- Right x ->
795+ Right x -> do
796+ print x
796797 pure x
797798
798799parsePackageDump :: Parser (MonoidalMap ModuleName (NESet PackageSource ))
@@ -813,7 +814,7 @@ parsePackageDumpPackage = do
813814 skipSomeTill
814815 (try skipLine)
815816 ( asum
816- [ (,True ) <$> try parseExposedModules
817+ [ (,True ) <$> parseExposedModules
817818 , ([] , False ) <$ try packageEnd
818819 ]
819820 )
@@ -838,15 +839,18 @@ parsePackageDumpPackage = do
838839 string " exposed-modules:"
839840 >> (void eol <|> pure () )
840841 >> some
841- ( try
842- $ skipSome nonEolSpaceChar
843- >> sepBy1 parseModuleName nonEolSpaceChar
842+ ( skipSome nonEolSpaceChar
843+ >> sepBy1 (parseModuleName <* optional from <* optional " ," ) nonEolSpaceChar
844844 <* eol
845845 )
846846 <&> concat
847847
848848 packageEnd = try (string " ---" >> (void eol <|> eof)) <|> eof
849849
850+ from = do
851+ _ <- " from "
852+ some $ choice [ alphaNumChar, char ' -' , char ' :' , char ' .' ]
853+
850854nonEolSpaceChar :: Parser ()
851855nonEolSpaceChar =
852856 void $ notFollowedBy eol >> (spaceChar <|> char ' \t ' )
You can’t perform that action at this time.
0 commit comments