Teo Camarasu pushed to branch wip/T26834 at Glasgow Haskell Compiler / GHC Commits: 1abfa580 by Teo Camarasu at 2026-01-29T11:14:21+00:00 ghc-internal: refine List imports - - - - - d2c0db71 by Teo Camarasu at 2026-01-29T11:14:21+00:00 Move MonadFix Identity into Monad.Fix - - - - - c7d4cf5e by Teo Camarasu at 2026-01-29T11:14:21+00:00 Split out GHC.Internal.Data.Ord.Down - - - - - 23 changed files: - libraries/base/src/Data/Ord.hs - libraries/ghc-internal/ghc-internal.cabal.in - libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fix.hs - libraries/ghc-internal/src/GHC/Internal/Control/Monad/Zip.hs - libraries/ghc-internal/src/GHC/Internal/Data/Data.hs - libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs - libraries/ghc-internal/src/GHC/Internal/Data/Functor/Identity.hs - libraries/ghc-internal/src/GHC/Internal/Data/List/NonEmpty.hs - libraries/ghc-internal/src/GHC/Internal/Data/Ord.hs - + libraries/ghc-internal/src/GHC/Internal/Data/Ord/Down.hs - libraries/ghc-internal/src/GHC/Internal/Data/String.hs - libraries/ghc-internal/src/GHC/Internal/Data/Traversable.hs - libraries/ghc-internal/src/GHC/Internal/Data/Version.hs - libraries/ghc-internal/src/GHC/Internal/Event/Windows.hsc - libraries/ghc-internal/src/GHC/Internal/ExecutionStack/Internal.hsc - libraries/ghc-internal/src/GHC/Internal/Exts.hs - libraries/ghc-internal/src/GHC/Internal/Generics.hs - libraries/ghc-internal/src/GHC/Internal/IO/Encoding/CodePage.hs - libraries/ghc-internal/src/GHC/Internal/ResponseFile.hs - libraries/ghc-internal/src/GHC/Internal/Stack/Decode.hs - libraries/ghc-internal/src/GHC/Internal/System/Environment/Blank.hsc - libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc - libraries/ghc-internal/src/GHC/Internal/System/Posix/Internals.hs Changes: ===================================== libraries/base/src/Data/Ord.hs ===================================== @@ -21,4 +21,5 @@ module Data.Ord clamp ) where -import GHC.Internal.Data.Ord \ No newline at end of file +import GHC.Internal.Data.Ord +import GHC.Internal.Data.Ord.Down ===================================== libraries/ghc-internal/ghc-internal.cabal.in ===================================== @@ -160,6 +160,7 @@ Library GHC.Internal.Data.NonEmpty GHC.Internal.Data.OldList GHC.Internal.Data.Ord + GHC.Internal.Data.Ord.Down GHC.Internal.Data.Proxy GHC.Internal.Data.Semigroup.Internal GHC.Internal.Data.STRef @@ -576,4 +577,4 @@ Library ghc-options: -this-unit-id ghc-internal -- Make sure we don't accidentally regress into anti-patterns - ghc-options: -Wcompat -Wnoncanonical-monad-instances + ghc-options: -Wcompat -Wnoncanonical-monad-instances -Werror=unused-imports ===================================== libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fix.hs ===================================== @@ -33,13 +33,13 @@ import GHC.Internal.Data.Maybe import GHC.Internal.Data.Monoid ( Monoid, Dual(..), Sum(..), Product(..) , First(..), Last(..), Alt(..), Ap(..) ) import GHC.Internal.Data.NonEmpty ( NonEmpty(..) ) -import GHC.Internal.Data.Ord ( Down(..) ) import GHC.Internal.Data.Tuple ( Solo(..), snd ) import GHC.Internal.Base ( Monad, errorWithoutStackTrace, (.) ) import GHC.Internal.Generics import GHC.Internal.List ( head, drop ) import GHC.Internal.Control.Monad.ST.Imp import GHC.Internal.System.IO +import GHC.Internal.Data.Functor.Identity (Identity(..)) -- | Monads having fixed points with a \'knot-tying\' semantics. -- Instances of 'MonadFix' should satisfy the following laws: @@ -166,8 +166,6 @@ instance (MonadFix f, MonadFix g) => MonadFix (f :*: g) where fstP (a :*: _) = a sndP (_ :*: b) = b --- Instances for Data.Ord - --- | @since base-4.12.0.0 -instance MonadFix Down where - mfix f = Down (fix (getDown . f)) +-- | @since base-4.8.0.0 +instance MonadFix Identity where + mfix f = Identity (fix (runIdentity . f)) ===================================== libraries/ghc-internal/src/GHC/Internal/Control/Monad/Zip.hs ===================================== @@ -23,12 +23,11 @@ import GHC.Internal.Data.Functor.Identity import qualified GHC.Internal.Data.Functor import GHC.Internal.Data.Monoid import GHC.Internal.Data.NonEmpty ( NonEmpty(..) ) -import GHC.Internal.Data.Ord ( Down(..) ) import GHC.Internal.Data.Proxy --import qualified Data.List.NonEmpty as NE import GHC.Internal.Generics import qualified GHC.Internal.Data.List.NonEmpty as NE -import qualified GHC.Internal.Data.List as List +import qualified GHC.Internal.List as List import GHC.Internal.Data.Maybe import GHC.Internal.Data.Tuple --import Prelude @@ -136,9 +135,3 @@ instance MonadZip f => MonadZip (M1 i c f) where -- | @since 4.9.0.0 instance (MonadZip f, MonadZip g) => MonadZip (f :*: g) where mzipWith f (x1 :*: y1) (x2 :*: y2) = mzipWith f x1 x2 :*: mzipWith f y1 y2 - --- instances for GHC.Internal.Data.Ord - --- | @since 4.12.0.0 -instance MonadZip Down where - mzipWith = liftM2 ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Data.hs ===================================== @@ -116,8 +116,8 @@ import GHC.Internal.Data.Eq import GHC.Internal.Data.Maybe import GHC.Internal.Data.Monoid import GHC.Internal.Data.NonEmpty ( NonEmpty(..) ) -import GHC.Internal.Data.Ord -import GHC.Internal.Data.List (findIndex) +import GHC.Internal.Data.Ord.Down +import GHC.Internal.Data.OldList (findIndex) import GHC.Internal.Data.Typeable import GHC.Internal.Data.Version( Version(..) ) import GHC.Internal.Base hiding (Any, IntRep, FloatRep, NonEmpty(..)) ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs ===================================== @@ -921,9 +921,6 @@ deriving instance Foldable UInt -- | @since base-4.9.0.0 deriving instance Foldable UWord --- Instances for Data.Ord --- | @since base-4.12.0.0 -deriving instance Foldable Down -- | Right-to-left monadic fold over the elements of a structure. -- ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Functor/Identity.hs ===================================== @@ -33,7 +33,6 @@ module GHC.Internal.Data.Functor.Identity ( Identity(..), ) where -import GHC.Internal.Control.Monad.Fix import GHC.Internal.Data.Bits (Bits, FiniteBits) import GHC.Internal.Data.Coerce import GHC.Internal.Data.Foldable @@ -143,7 +142,3 @@ instance Applicative Identity where -- | @since base-4.8.0.0 instance Monad Identity where m >>= k = k (runIdentity m) - --- | @since base-4.8.0.0 -instance MonadFix Identity where - mfix f = Identity (fix (runIdentity . f)) ===================================== libraries/ghc-internal/src/GHC/Internal/Data/List/NonEmpty.hs ===================================== @@ -8,7 +8,7 @@ module GHC.Internal.Data.List.NonEmpty ) where import GHC.Internal.Data.NonEmpty (NonEmpty (..), map) -import qualified GHC.Internal.Data.List as List +import qualified GHC.Internal.List as List -- | The 'zip' function takes two streams and returns a stream of -- corresponding pairs. ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Ord.hs ===================================== @@ -19,21 +19,11 @@ module GHC.Internal.Data.Ord ( Ord(..), Ordering(..), - Down(..), comparing, clamp, ) where -import GHC.Internal.Data.Bits (Bits, FiniteBits, complement) -import GHC.Internal.Foreign.Storable (Storable) -import GHC.Internal.Ix (Ix) import GHC.Internal.Base -import GHC.Internal.Enum (Bounded(..), Enum(..)) -import GHC.Internal.Float (Floating, RealFloat) -import GHC.Internal.Num -import GHC.Internal.Read -import GHC.Internal.Real (Fractional, Real, RealFrac) -import GHC.Internal.Show -- $setup -- >>> import Prelude @@ -68,115 +58,3 @@ comparing p x y = compare (p x) (p y) -- @since base-4.16.0.0 clamp :: (Ord a) => (a, a) -> a -> a clamp (low, high) a = min high (max a low) - --- | The 'Down' type allows you to reverse sort order conveniently. A value of type --- @'Down' a@ contains a value of type @a@ (represented as @'Down' a@). --- --- If @a@ has an @'Ord'@ instance associated with it then comparing two --- values thus wrapped will give you the opposite of their normal sort order. --- This is particularly useful when sorting in generalised list comprehensions, --- as in: @then sortWith by 'Down' x@. --- --- >>> compare True False --- GT --- --- >>> compare (Down True) (Down False) --- LT --- --- If @a@ has a @'Bounded'@ instance then the wrapped instance also respects --- the reversed ordering by exchanging the values of @'minBound'@ and --- @'maxBound'@. --- --- >>> minBound :: Int --- -9223372036854775808 --- --- >>> minBound :: Down Int --- Down 9223372036854775807 --- --- All other instances of @'Down' a@ behave as they do for @a@. --- --- @since base-4.6.0.0 -newtype Down a = Down - { getDown :: a -- ^ @since base-4.14.0.0 - } - deriving - ( Eq -- ^ @since base-4.6.0.0 - , Num -- ^ @since base-4.11.0.0 - , Semigroup -- ^ @since base-4.11.0.0 - , Monoid -- ^ @since base-4.11.0.0 - , Bits -- ^ @since base-4.14.0.0 - , FiniteBits -- ^ @since base-4.14.0.0 - , Floating -- ^ @since base-4.14.0.0 - , Fractional -- ^ @since base-4.14.0.0 - , Ix -- ^ @since base-4.14.0.0 - , Real -- ^ @since base-4.14.0.0 - , RealFrac -- ^ @since base-4.14.0.0 - , RealFloat -- ^ @since base-4.14.0.0 - , Storable -- ^ @since base-4.14.0.0 - ) - --- | This instance would be equivalent to the derived instances of the --- 'Down' newtype if the 'getDown' field were removed --- --- @since base-4.7.0.0 -instance (Read a) => Read (Down a) where - readsPrec d = readParen (d > 10) $ \ r -> - [(Down x,t) | ("Down",s) <- lex r, (x,t) <- readsPrec 11 s] - --- | This instance would be equivalent to the derived instances of the --- 'Down' newtype if the 'getDown' field were removed --- --- @since base-4.7.0.0 -instance (Show a) => Show (Down a) where - showsPrec d (Down x) = showParen (d > 10) $ - showString "Down " . showsPrec 11 x - --- | @since base-4.6.0.0 -instance Ord a => Ord (Down a) where - compare (Down x) (Down y) = y `compare` x - Down x < Down y = y < x - Down x > Down y = y > x - Down x <= Down y = y <= x - Down x >= Down y = y >= x - min (Down x) (Down y) = Down (max y x) - max (Down x) (Down y) = Down (min y x) - --- | Swaps @'minBound'@ and @'maxBound'@ of the underlying type. --- --- @since base-4.14.0.0 -instance Bounded a => Bounded (Down a) where - minBound = Down maxBound - maxBound = Down minBound - --- | Swaps @'succ'@ and @'pred'@ of the underlying type. --- --- @since base-4.18.0.0 -instance (Enum a, Bounded a, Eq a) => Enum (Down a) where - succ = fmap pred - pred = fmap succ - - -- Here we use the fact that 'comparing (complement @Int)' behaves - -- as an order-swapping `compare @Int`. - fromEnum = complement . fromEnum . getDown - toEnum = Down . toEnum . complement - - enumFrom (Down x) - | x == minBound - = [Down x] -- We can't rely on 'enumFromThen _ (pred @a minBound)` behaving nicely, - -- since 'enumFromThen _' might be strict and 'pred minBound' might throw - | otherwise - = coerce $ enumFromThen x (pred x) - enumFromThen (Down x) (Down y) = coerce $ enumFromThen x y - --- | @since base-4.11.0.0 -instance Functor Down where - fmap = coerce - --- | @since base-4.11.0.0 -instance Applicative Down where - pure = Down - (<*>) = coerce - --- | @since base-4.11.0.0 -instance Monad Down where - Down a >>= k = k a ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Ord/Down.hs ===================================== @@ -0,0 +1,169 @@ +{-# LANGUAGE Trustworthy #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DeriveFoldable #-} +{-# LANGUAGE DeriveTraversable #-} +{-# LANGUAGE StandaloneDeriving #-} + +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Internal.Data.Ord.Down +-- Copyright : (c) The University of Glasgow 2005 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : stable +-- Portability : portable +-- +-- Orderings +-- +----------------------------------------------------------------------------- + +module GHC.Internal.Data.Ord.Down ( + Down(..), + ) where + +import GHC.Internal.Data.Bits (Bits, FiniteBits, complement) +import GHC.Internal.Ix (Ix) +import GHC.Internal.Foreign.Storable (Storable) +import GHC.Internal.Base +import GHC.Internal.Enum (Bounded(..), Enum(..)) +import GHC.Internal.Float (Floating, RealFloat) +import GHC.Internal.Num +import GHC.Internal.Read +import GHC.Internal.Real (Fractional, Real, RealFrac) +import GHC.Internal.Show +import GHC.Internal.Generics +import GHC.Internal.Data.Foldable +import GHC.Internal.Data.Traversable +import GHC.Internal.Control.Monad.Zip + +-- $setup +-- >>> import Prelude + +-- | The 'Down' type allows you to reverse sort order conveniently. A value of type +-- @'Down' a@ contains a value of type @a@ (represented as @'Down' a@). +-- +-- If @a@ has an @'Ord'@ instance associated with it then comparing two +-- values thus wrapped will give you the opposite of their normal sort order. +-- This is particularly useful when sorting in generalised list comprehensions, +-- as in: @then sortWith by 'Down' x@. +-- +-- >>> compare True False +-- GT +-- +-- >>> compare (Down True) (Down False) +-- LT +-- +-- If @a@ has a @'Bounded'@ instance then the wrapped instance also respects +-- the reversed ordering by exchanging the values of @'minBound'@ and +-- @'maxBound'@. +-- +-- >>> minBound :: Int +-- -9223372036854775808 +-- +-- >>> minBound :: Down Int +-- Down 9223372036854775807 +-- +-- All other instances of @'Down' a@ behave as they do for @a@. +-- +-- @since base-4.6.0.0 +newtype Down a = Down + { getDown :: a -- ^ @since base-4.14.0.0 + } + deriving + ( Eq -- ^ @since base-4.6.0.0 + , Num -- ^ @since base-4.11.0.0 + , Semigroup -- ^ @since base-4.11.0.0 + , Monoid -- ^ @since base-4.11.0.0 + , Bits -- ^ @since base-4.14.0.0 + , FiniteBits -- ^ @since base-4.14.0.0 + , Floating -- ^ @since base-4.14.0.0 + , Fractional -- ^ @since base-4.14.0.0 + , Ix -- ^ @since base-4.14.0.0 + , Real -- ^ @since base-4.14.0.0 + , RealFrac -- ^ @since base-4.14.0.0 + , RealFloat -- ^ @since base-4.14.0.0 + , Storable -- ^ @since base-4.14.0.0 + , Generic -- ^ @since base-4.12.0.0 + ) + +-- | @since base-4.12.0.0 +deriving instance Generic1 Down + +-- | @since base-4.12.0.0 +deriving instance Foldable Down + +-- | @since base-4.12.0.0 +deriving instance Traversable Down + +-- | @since 4.12.0.0 +instance MonadZip Down where + mzipWith = liftM2 + +-- | This instance would be equivalent to the derived instances of the +-- 'Down' newtype if the 'getDown' field were removed +-- +-- @since base-4.7.0.0 +instance (Read a) => Read (Down a) where + readsPrec d = readParen (d > 10) $ \ r -> + [(Down x,t) | ("Down",s) <- lex r, (x,t) <- readsPrec 11 s] + +-- | This instance would be equivalent to the derived instances of the +-- 'Down' newtype if the 'getDown' field were removed +-- +-- @since base-4.7.0.0 +instance (Show a) => Show (Down a) where + showsPrec d (Down x) = showParen (d > 10) $ + showString "Down " . showsPrec 11 x + +-- | @since base-4.6.0.0 +instance Ord a => Ord (Down a) where + compare (Down x) (Down y) = y `compare` x + Down x < Down y = y < x + Down x > Down y = y > x + Down x <= Down y = y <= x + Down x >= Down y = y >= x + min (Down x) (Down y) = Down (max y x) + max (Down x) (Down y) = Down (min y x) + +-- | Swaps @'minBound'@ and @'maxBound'@ of the underlying type. +-- +-- @since base-4.14.0.0 +instance Bounded a => Bounded (Down a) where + minBound = Down maxBound + maxBound = Down minBound + +-- | Swaps @'succ'@ and @'pred'@ of the underlying type. +-- +-- @since base-4.18.0.0 +instance (Enum a, Bounded a, Eq a) => Enum (Down a) where + succ = fmap pred + pred = fmap succ + + -- Here we use the fact that 'comparing (complement @Int)' behaves + -- as an order-swapping `compare @Int`. + fromEnum = complement . fromEnum . getDown + toEnum = Down . toEnum . complement + + enumFrom (Down x) + | x == minBound + = [Down x] -- We can't rely on 'enumFromThen _ (pred @a minBound)` behaving nicely, + -- since 'enumFromThen _' might be strict and 'pred minBound' might throw + | otherwise + = coerce $ enumFromThen x (pred x) + enumFromThen (Down x) (Down y) = coerce $ enumFromThen x y + +-- | @since base-4.11.0.0 +instance Functor Down where + fmap = coerce + +-- | @since base-4.11.0.0 +instance Applicative Down where + pure = Down + (<*>) = coerce + +-- | @since base-4.11.0.0 +instance Monad Down where + Down a >>= k = k a ===================================== libraries/ghc-internal/src/GHC/Internal/Data/String.hs ===================================== @@ -35,7 +35,7 @@ module GHC.Internal.Data.String ( import GHC.Internal.Base import GHC.Internal.Data.Functor.Const (Const (Const)) import GHC.Internal.Data.Functor.Identity (Identity (Identity)) -import GHC.Internal.Data.List (lines, words, unlines, unwords) +import GHC.Internal.Data.OldList (lines, words, unlines, unwords) -- | `IsString` is used in combination with the @-XOverloadedStrings@ -- language extension to convert the literals to different string types. ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Traversable.hs ===================================== @@ -46,7 +46,6 @@ import GHC.Internal.Data.Functor.Identity ( Identity(..) ) import GHC.Internal.Data.Functor.Utils ( StateL(..), StateR(..), StateT(..), (#.) ) import GHC.Internal.Data.Monoid ( Dual(..), Sum(..), Product(..), First(..), Last(..), Alt(..), Ap(..) ) -import GHC.Internal.Data.Ord ( Down(..) ) import GHC.Internal.Data.Proxy ( Proxy(..) ) import GHC.Internal.Arr @@ -364,10 +363,6 @@ deriving instance Traversable UInt -- | @since base-4.9.0.0 deriving instance Traversable UWord --- Instance for Data.Ord --- | @since base-4.12.0.0 -deriving instance Traversable Down - -- general functions -- | 'for' is 'traverse' with its arguments flipped. For a version ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Version.hs ===================================== @@ -40,7 +40,7 @@ import GHC.Internal.Data.Functor ( Functor(..) ) import GHC.Internal.Data.Bool ( (&&) ) import GHC.Internal.Data.Eq import GHC.Internal.Int ( Int ) -import GHC.Internal.Data.List ( map, sort, concat, concatMap, intersperse, (++) ) +import GHC.Internal.Data.OldList ( map, sort, concat, concatMap, intersperse, (++) ) import GHC.Internal.Data.Ord import GHC.Internal.Data.String ( String ) import GHC.Internal.Base ( Applicative(..) ) ===================================== libraries/ghc-internal/src/GHC/Internal/Event/Windows.hsc ===================================== @@ -103,7 +103,7 @@ import GHC.Internal.IORef import GHC.Internal.Maybe import GHC.Internal.Ptr import GHC.Internal.Word -import GHC.Internal.Data.OldList (deleteBy) +import GHC.Internal.List (deleteBy) import qualified GHC.Internal.Event.Array as A import GHC.Internal.Base import GHC.Internal.Conc.Bound ===================================== libraries/ghc-internal/src/GHC/Internal/ExecutionStack/Internal.hsc ===================================== @@ -39,7 +39,7 @@ module GHC.Internal.ExecutionStack.Internal ( import GHC.Internal.Data.Functor import GHC.Internal.Data.Maybe -import GHC.Internal.Data.List (reverse, null) +import GHC.Internal.List (reverse, null) import GHC.Internal.Word import GHC.Internal.Foreign.C.Types import GHC.Internal.Foreign.C.String (peekCString, CString) ===================================== libraries/ghc-internal/src/GHC/Internal/Exts.hs ===================================== @@ -318,7 +318,7 @@ import qualified GHC.Internal.Data.Coerce import GHC.Internal.Data.String import GHC.Internal.Data.OldList import GHC.Internal.Data.Data -import GHC.Internal.Data.Ord +import GHC.Internal.Data.Ord.Down import qualified GHC.Internal.Debug.Trace import GHC.Internal.Unsafe.Coerce ( unsafeCoerce# ) -- just for re-export ===================================== libraries/ghc-internal/src/GHC/Internal/Generics.hs ===================================== @@ -732,7 +732,6 @@ module GHC.Internal.Generics ( -- We use some base types import GHC.Internal.Data.Either ( Either (..) ) import GHC.Internal.Data.Maybe ( Maybe(..), fromMaybe ) -import GHC.Internal.Data.Ord ( Down(..) ) import GHC.Internal.Bignum.Integer ( Integer, integerToInt ) import GHC.Internal.Prim ( Addr#, Char#, Double#, Float#, Int#, Word# ) import GHC.Internal.Ptr ( Ptr(..) ) @@ -1629,9 +1628,6 @@ deriving instance Generic ((,,,,,,,,,,,,,) a b c d e f g h i j k l m n) -- | @since base-4.16.0.0 deriving instance Generic ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o) --- | @since base-4.12.0.0 -deriving instance Generic (Down a) - -- | @since base-4.15.0.0 deriving instance Generic SrcLoc @@ -1701,9 +1697,6 @@ deriving instance Generic1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) -- | @since base-4.16.0.0 deriving instance Generic1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) --- | @since base-4.12.0.0 -deriving instance Generic1 Down - -------------------------------------------------------------------------------- -- Copied from the singletons package -------------------------------------------------------------------------------- ===================================== libraries/ghc-internal/src/GHC/Internal/IO/Encoding/CodePage.hs ===================================== @@ -30,7 +30,7 @@ import GHC.Internal.IO.Encoding.Types import GHC.Internal.IO.Buffer import GHC.Internal.Data.Bits import GHC.Internal.Data.Maybe -import GHC.Internal.Data.OldList (lookup) +import GHC.Internal.List (lookup) import qualified GHC.Internal.IO.Encoding.CodePage.API as API import GHC.Internal.IO.Encoding.CodePage.Table ===================================== libraries/ghc-internal/src/GHC/Internal/ResponseFile.hs ===================================== @@ -28,7 +28,7 @@ import GHC.Internal.Control.Exception import GHC.Internal.Data.Foldable (Foldable(..)) import GHC.Internal.Base import GHC.Internal.Unicode (isSpace) -import GHC.Internal.Data.List (filter, unlines, concat, reverse) +import GHC.Internal.Data.OldList (filter, unlines, concat, reverse) import GHC.Internal.Text.Show (show) import GHC.Internal.System.Environment (getArgs) import GHC.Internal.System.Exit (exitFailure) ===================================== libraries/ghc-internal/src/GHC/Internal/Stack/Decode.hs ===================================== @@ -36,7 +36,7 @@ import GHC.Internal.Num import GHC.Internal.Data.Bits import GHC.Internal.Data.Functor import GHC.Internal.Data.Maybe (catMaybes) -import GHC.Internal.Data.List +import GHC.Internal.List import GHC.Internal.Data.Tuple import GHC.Internal.Foreign.Ptr import GHC.Internal.Foreign.Storable ===================================== libraries/ghc-internal/src/GHC/Internal/System/Environment/Blank.hsc ===================================== @@ -40,14 +40,14 @@ module GHC.Internal.System.Environment.Blank ) where import GHC.Internal.Data.Functor -import GHC.Internal.Data.List (elem, null, takeWhile) +import GHC.Internal.List (elem, null, takeWhile) import GHC.Internal.Foreign.C.String import GHC.Internal.Base #if defined(mingw32_HOST_OS) import GHC.Internal.Foreign.Ptr import GHC.Internal.Windows import GHC.Internal.Control.Monad -import GHC.Internal.Data.List (lookup) +import GHC.Internal.List (lookup) #else import GHC.Internal.Foreign.C.Error import GHC.Internal.Foreign.C.Types ===================================== libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc ===================================== @@ -53,7 +53,7 @@ import GHC.Internal.System.IO.Error (isDoesNotExistError) import GHC.Internal.System.Posix.Internals #elif defined(linux_HOST_OS) || defined(gnu_HOST_OS) import GHC.Internal.Data.Functor -import GHC.Internal.Data.List (isSuffixOf) +import GHC.Internal.Data.OldList (isSuffixOf) import GHC.Internal.Foreign.C.Types import GHC.Internal.Foreign.C.Error import GHC.Internal.Foreign.C.String @@ -85,7 +85,7 @@ import GHC.Internal.System.Posix.Internals import GHC.Internal.Control.Exception import GHC.Internal.Control.Monad.Fail import GHC.Internal.Data.Functor -import GHC.Internal.Data.List (isPrefixOf, drop) +import GHC.Internal.Data.OldList (isPrefixOf, drop) import GHC.Internal.Word import GHC.Internal.Foreign.C.String import GHC.Internal.Foreign.Marshal.Array ===================================== libraries/ghc-internal/src/GHC/Internal/System/Posix/Internals.hs ===================================== @@ -70,7 +70,7 @@ import GHC.Internal.Foreign.Storable import qualified GHC.Internal.Foreign.C.String.Encoding as GHC #else import GHC.Internal.Int -import GHC.Internal.Data.OldList (elem) +import GHC.Internal.List (elem) #endif -- --------------------------------------------------------------------------- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c7cab14210c2578d36933856b158f67... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c7cab14210c2578d36933856b158f67... You're receiving this email because of your account on gitlab.haskell.org.