From c9afe2216ccabd36e3083ec3b508310fcdb5eae3 Mon Sep 17 00:00:00 2001 From: M Farkas-Dyck Date: Sun, 5 Jun 2022 23:51:37 -0800 Subject: =?UTF-8?q?Clean=20up=20some.=20In=20particular:=20=E2=80=A2=20Del?= =?UTF-8?q?ete=20some=20dead=20code,=20largely=20under=20`GHC.Utils`.=20?= =?UTF-8?q?=E2=80=A2=20Clean=20up=20a=20few=20definitions=20in=20`GHC.Util?= =?UTF-8?q?s.(Misc,=20Monad)`.=20=E2=80=A2=20Clean=20up=20`GHC.Types.SrcLo?= =?UTF-8?q?c`.=20=E2=80=A2=20Derive=20stock=20`Functor,=20Foldable,=20Trav?= =?UTF-8?q?ersable`=20for=20more=20types.=20=E2=80=A2=20Derive=20more=20in?= =?UTF-8?q?stances=20for=20newtypes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump haddock submodule. --- compiler/GHC/Unit/Module.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'compiler/GHC/Unit/Module.hs') diff --git a/compiler/GHC/Unit/Module.hs b/compiler/GHC/Unit/Module.hs index 7ae0059b71..030dd5a39f 100644 --- a/compiler/GHC/Unit/Module.hs +++ b/compiler/GHC/Unit/Module.hs @@ -49,10 +49,11 @@ import GHC.Types.Unique.DSet import GHC.Unit.Types import GHC.Unit.Module.Location import GHC.Unit.Module.Env -import GHC.Utils.Misc import Language.Haskell.Syntax.Module.Name +import Data.Semigroup + -- | A 'Module' is definite if it has no free holes. moduleIsDefinite :: Module -> Bool moduleIsDefinite = isEmptyUniqDSet . moduleFreeHoles @@ -69,9 +70,7 @@ moduleStableString Module{..} = -- gives an ordering based on the 'Unique's of the components, which may -- not be stable from run to run of the compiler. stableModuleCmp :: Module -> Module -> Ordering -stableModuleCmp (Module p1 n1) (Module p2 n2) - = (p1 `stableUnitCmp` p2) `thenCmp` - (n1 `stableModuleNameCmp` n2) +stableModuleCmp (Module p1 n1) (Module p2 n2) = stableUnitCmp p1 p2 <> stableModuleNameCmp n1 n2 class ContainsModule t where extractModule :: t -> Module -- cgit v1.2.1