[GHC] #10887: Please export GhcMake.downsweep and make it return a partial module graph in case of errors

#10887: Please export GhcMake.downsweep and make it return a partial module graph in case of errors -------------------------------------+------------------------------------- Reporter: DanielG | Owner: Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- Hi, in ghc-mod we have to essentially run a downsweep before we have any idea what `-package` flags to pass to GHC. We do this in order to figure out which modules belong to each Cabal component. If we use `depanal` to do this it will unfortunately just throw import errors because we haven't actually told GHC which package should be in scope yet. I think depanal/downsweep also abort on some other types of errors, which would also have to be cought since ghc-mod needs to work even when there are modules with parse errors etc (because the user is still editing them). I'm not sure where ghc parses the module headers so I'm not sure if it's going to blow up horribly when a module header doesn't parse or if that's just going to make downsweep return failure too. For the time being we essentially just re-implemented downsweep's functionality .. poorly but I'd really rather use downsweep directly. Thanks. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10887 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10887: Please export GhcMake.downsweep and make it return a partial module graph in case of errors -------------------------------------+------------------------------------- Reporter: DanielG | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): If you are just asking that module `GHC` in package `ghc` should export a particular existing function, then that seems easy and uncontroversial: please submit a patch. If you want a different function that might be harder; perhaps you can specify and implement it? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10887#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC