recursion-ninja pushed to branch wip/26699 at Glasgow Haskell Compiler / GHC Commits: ebe18155 by recursion-ninja at 2026-01-28T15:24:18+00:00 Apply 4 suggestion(s) to 4 file(s) Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita@gmail.com> - - - - - 4 changed files: - compiler/GHC/Tc/Utils/Instantiate.hs - compiler/GHC/Utils/Binary.hs - compiler/Language/Haskell/Syntax/Basic.hs - compiler/Language/Haskell/Syntax/Decls/Overlap.hs Changes: ===================================== compiler/GHC/Tc/Utils/Instantiate.hs ===================================== @@ -985,7 +985,7 @@ tcExtendLocalInstEnv :: [ClsInst] -> TcM a -> TcM a tcExtendLocalInstEnv dfuns thing_inside = do { traceDFuns dfuns ; env <- getGblEnv - -- F~orce the access to the TcgEnv so it isn't retained. + -- Force the access to the TcgEnv so it isn't retained. -- During auditing it is much easier to observe in -hi profiles if -- there are a very small number of TcGblEnv. Keeping a TcGblEnv -- alive is quite dangerous because it contains reference to many ===================================== compiler/GHC/Utils/Binary.hs ===================================== @@ -2013,10 +2013,14 @@ instance NFData a => NFData (FingerprintWithValue a) where = rnf fp `seq` rnf mflags `seq` () instance Binary Boxity where -- implemented via isBoxed-isomorphism to Bool - put_ bh = put_ bh . isBoxed + put_ bh t = putByte bh $ case t of + Boxed -> 0 + Unboxed -> 1 get bh = do - b <- get bh - pure $ if b then Boxed else Unboxed + t <- getByte bh + evaluate $ case t of + 0 -> Boxed + 1 -> Unboxed instance Binary ConInfoTable where get bh = Binary.decode <$> get bh ===================================== compiler/Language/Haskell/Syntax/Basic.hs ===================================== @@ -3,8 +3,6 @@ {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE UndecidableInstances #-} -- Eq XOverlapMode, NFData OverlapMode --- | Data-type defintions of the Abstrast Sytntax Tree --- which *do not* have any /Trees That Grow/ extension points. module Language.Haskell.Syntax.Basic where import Control.DeepSeq ===================================== compiler/Language/Haskell/Syntax/Decls/Overlap.hs ===================================== @@ -4,7 +4,7 @@ {-# LANGUAGE UndecidableInstances #-} -- Eq XOverlapMode, NFData OverlapMode {- | -Data-type describing the state of "overlapping instances" for a type. +Data-type describing the overlap annotations for instances. -} module Language.Haskell.Syntax.Decls.Overlap where View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ebe1815552f2d5edf28b0fd06140c036... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ebe1815552f2d5edf28b0fd06140c036... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
recursion-ninja (@recursion-ninja)