Given a module name, there may be multiple ways it came into scope, possibly simultaneously. This data type tracks all the possible ways it could have come into scope. Warning: don't use the record functions, they're partial!
Constructors
ModHiddenModule is hidden, and thus never will be available for import. (But maybe the user didn't realize), so we'll still keep track of these modules.)
ModUnusable !UnusableUnitModule is unavailable because the unit is unusable.
ModOriginModule is public, and could have come from some places.
fromOrigUnit :: Maybe BoolJust Falsemeans that this module is in someone'sexported-moduleslist, but that package is hidden;Just Truemeans that it is available;Nothingmeans neither applies.fromExposedReexport :: [UnitInfo]Is the module available from a reexport of an exposed package? There could be multiple.
fromHiddenReexport :: [UnitInfo]Is the module available from a reexport of a hidden package?
fromPackageFlag :: BoolDid the module export come from a package flag? (ToDo: track more information.
Instances3Semigroup, Monoid, Outputable
Semigroup ModuleOriginDefined in ghc-10.0.0.20260917 · GHC.Unit.External.ModuleOriginMonoid ModuleOriginDefined in ghc-10.0.0.20260917 · GHC.Unit.External.ModuleOriginOutputable ModuleOriginDefined in ghc-10.0.0.20260917 · GHC.Unit.External.ModuleOrigin