summaryrefslogtreecommitdiff
path: root/compiler/GHC/Unit/Module.hs
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-04-30 11:07:15 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-04 04:34:42 -0400
commit32a4ae90b50cc56f2955f489ad0cf8c7ff5e131a (patch)
tree274e86d49420a09eb8400bc3751c55f827ed4e56 /compiler/GHC/Unit/Module.hs
parentcb5c31b51b021ce86890bba73276fe6f7405f5d3 (diff)
downloadhaskell-32a4ae90b50cc56f2955f489ad0cf8c7ff5e131a.tar.gz
Clean up boot vs non-boot disambiguating types
We often have (ModuleName, Bool) or (Module, Bool) pairs for "extended" module names (without or with a unit id) disambiguating boot and normal modules. We think this is important enough across the compiler that it deserves a new nominal product type. We do this with synnoyms and a functor named with a `Gen` prefix, matching other newly created definitions. It was also requested that we keep custom `IsBoot` / `NotBoot` sum type. So we have it too. This means changing many the many bools to use that instead. Updates `haddock` submodule.
Diffstat (limited to 'compiler/GHC/Unit/Module.hs')
-rw-r--r--compiler/GHC/Unit/Module.hs12
1 files changed, 5 insertions, 7 deletions
diff --git a/compiler/GHC/Unit/Module.hs b/compiler/GHC/Unit/Module.hs
index 7eed456311..14751d7003 100644
--- a/compiler/GHC/Unit/Module.hs
+++ b/compiler/GHC/Unit/Module.hs
@@ -9,13 +9,13 @@ These are Uniquable, hence we can build Maps with Modules as
the keys.
-}
-{-# LANGUAGE RecordWildCards #-}
-{-# LANGUAGE MultiParamTypeClasses #-}
-{-# LANGUAGE ExplicitNamespaces #-}
-{-# LANGUAGE TypeSynonymInstances #-}
-{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFunctor #-}
+{-# LANGUAGE ExplicitNamespaces #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE TypeSynonymInstances #-}
module GHC.Unit.Module
( module GHC.Unit.Types
@@ -29,7 +29,6 @@ module GHC.Unit.Module
-- * ModuleEnv
, module GHC.Unit.Module.Env
-
-- * Generalization
, getModuleInstantiation
, getUnitInstantiations
@@ -148,4 +147,3 @@ isHoleModule _ = False
-- | Create a hole Module
mkHoleModule :: ModuleName -> GenModule (GenUnit u)
mkHoleModule = Module HoleUnit
-