diff options
-rw-r--r-- | compiler/GHC/Unit/Module/Env.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/GHC/Unit/Module/Env.hs b/compiler/GHC/Unit/Module/Env.hs index cf056e2bdf..be596bbc76 100644 --- a/compiler/GHC/Unit/Module/Env.hs +++ b/compiler/GHC/Unit/Module/Env.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Module environment module GHC.Unit.Module.Env ( -- * Module mappings @@ -50,6 +51,7 @@ import qualified GHC.Data.FiniteMap as Map -- | A map keyed off of 'Module's newtype ModuleEnv elt = ModuleEnv (Map NDModule elt) + deriving (Monoid, Semigroup) {- Note [ModuleEnv performance and determinism] @@ -206,6 +208,7 @@ type DModuleNameEnv elt = UniqDFM ModuleName elt -- | A map keyed off of 'InstalledModule' newtype InstalledModuleEnv elt = InstalledModuleEnv (Map InstalledModule elt) + deriving (Monoid, Semigroup) emptyInstalledModuleEnv :: InstalledModuleEnv a emptyInstalledModuleEnv = InstalledModuleEnv Map.empty |