Teo Camarasu pushed to branch wip/T26930 at Glasgow Haskell Compiler / GHC Commits: 316765d2 by Teo Camarasu at 2026-02-17T23:25:50+00:00 Float up generics - - - - - 15 changed files: - libraries/ghc-internal/src/GHC/Internal/ByteOrder.hs - − libraries/ghc-internal/src/GHC/Internal/ByteOrder.hs-boot - libraries/ghc-internal/src/GHC/Internal/Control/Arrow.hs - libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fix.hs - libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs - libraries/ghc-internal/src/GHC/Internal/Data/Functor/Const.hs - libraries/ghc-internal/src/GHC/Internal/Data/Functor/Identity.hs - libraries/ghc-internal/src/GHC/Internal/Data/Monoid.hs - libraries/ghc-internal/src/GHC/Internal/Data/Semigroup/Internal.hs - libraries/ghc-internal/src/GHC/Internal/Data/Traversable.hs - libraries/ghc-internal/src/GHC/Internal/Functor/ZipList.hs - libraries/ghc-internal/src/GHC/Internal/Generics.hs - libraries/ghc-internal/src/GHC/Internal/IO/Exception.hs - libraries/ghc-internal/src/GHC/Internal/Read.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Bits.hs Changes: ===================================== libraries/ghc-internal/src/GHC/Internal/ByteOrder.hs ===================================== @@ -27,8 +27,6 @@ module GHC.Internal.ByteOrder import GHC.Internal.Base import GHC.Internal.Enum -import GHC.Internal.Generics (Generic) -import GHC.Internal.Text.Read import GHC.Internal.Text.Show -- | Byte ordering. @@ -39,9 +37,7 @@ data ByteOrder , Ord -- ^ @since base-4.11.0.0 , Bounded -- ^ @since base-4.11.0.0 , Enum -- ^ @since base-4.11.0.0 - , Read -- ^ @since base-4.11.0.0 , Show -- ^ @since base-4.11.0.0 - , Generic -- ^ @since base-4.15.0.0 ) -- | The byte ordering of the target machine. ===================================== libraries/ghc-internal/src/GHC/Internal/ByteOrder.hs-boot deleted ===================================== @@ -1,29 +0,0 @@ -{-# LANGUAGE NoImplicitPrelude #-} - -{- -This SOURCE-imported hs-boot module cuts a big dependency loop: - -module ‘GHC.Stable’ -imports module ‘GHC.Ptr’ -imports module ‘Numeric’ -imports module ‘GHC.Read’ -imports module ‘GHC.Unicode’ -imports module ‘GHC.Unicode.Internal.Char.UnicodeData.GeneralCategory’ -imports module ‘GHC.Unicode.Internal.Bits’ -imports module ‘GHC.ByteOrder’ -imports module ‘GHC.Generics’ -imports module ‘Data.Ord’ -imports module ‘Foreign.Storable’ -imports module ‘GHC.Stable’ --} - -module GHC.Internal.ByteOrder where - --- See W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base -import GHC.Internal.Types () - -data ByteOrder - = BigEndian - | LittleEndian - -targetByteOrder :: ByteOrder ===================================== libraries/ghc-internal/src/GHC/Internal/Control/Arrow.hs ===================================== @@ -51,7 +51,7 @@ import GHC.Internal.Data.Tuple ( uncurry ) import GHC.Internal.Data.Either import GHC.Internal.Control.Category import GHC.Internal.Base hiding ( (.), id ) -import GHC.Internal.Generics (Generic, Generic1) +import GHC.Internal.Generics infixr 5 <+> infixr 3 *** @@ -179,12 +179,6 @@ instance Arrow (->) where -- | Kleisli arrows of a monad. newtype Kleisli m a b = Kleisli { runKleisli :: a -> m b } --- | @since base-4.14.0.0 -deriving instance Generic (Kleisli m a b) - --- | @since base-4.14.0.0 -deriving instance Generic1 (Kleisli m a) - -- | @since base-4.14.0.0 deriving instance Functor m => Functor (Kleisli m a) @@ -416,3 +410,8 @@ leftApp :: ArrowApply a => a b c -> a (Either b d) (Either c d) leftApp f = arr ((\b -> (arr (\() -> b) >>> f >>> arr Left, ())) ||| (\d -> (arr (\() -> d) >>> arr Right, ()))) >>> app +-- | @since base-4.14.0.0 +deriving instance Generic (Kleisli m a b) + +-- | @since base-4.14.0.0 +deriving instance Generic1 (Kleisli m a) ===================================== libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fix.hs ===================================== @@ -39,7 +39,6 @@ import GHC.Internal.Data.NonEmpty ( NonEmpty(..) ) import GHC.Internal.Data.Ord ( Down(..) ) import GHC.Internal.Data.Tuple ( Solo(..), fst, snd ) import GHC.Internal.Base ( IO, Monad, errorWithoutStackTrace, (.), return, liftM ) -import GHC.Internal.Generics import GHC.Internal.List ( head, drop ) import GHC.Internal.Control.Monad.ST.Imp import qualified GHC.Internal.Control.Monad.ST.Lazy.Imp as Lazy @@ -240,26 +239,6 @@ instance MonadFix f => MonadFix (Alt f) where instance MonadFix f => MonadFix (Ap f) where mfix f = Ap (mfix (getAp . f)) --- Instances for GHC.Generics --- | @since base-4.9.0.0 -instance MonadFix Par1 where - mfix f = Par1 (fix (unPar1 . f)) - --- | @since base-4.9.0.0 -instance MonadFix f => MonadFix (Rec1 f) where - mfix f = Rec1 (mfix (unRec1 . f)) - --- | @since base-4.9.0.0 -instance MonadFix f => MonadFix (M1 i c f) where - mfix f = M1 (mfix (unM1. f)) - --- | @since base-4.9.0.0 -instance (MonadFix f, MonadFix g) => MonadFix (f :*: g) where - mfix f = (mfix (fstP . f)) :*: (mfix (sndP . f)) - where - fstP (a :*: _) = a - sndP (_ :*: b) = b - -- Instances for Data.Ord -- | @since base-4.12.0.0 ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs ===================================== @@ -65,7 +65,6 @@ import GHC.Internal.Arr ( Array(..), elems, numElements, foldlElems', foldrElems', foldl1Elems, foldr1Elems) import GHC.Internal.Base hiding ( foldr ) -import GHC.Internal.Generics import GHC.Internal.Tuple (Solo (..)) import GHC.Internal.Num ( Num(..) ) @@ -860,67 +859,6 @@ instance (Foldable f) => Foldable (Alt f) where instance (Foldable f) => Foldable (Ap f) where foldMap f = foldMap f . getAp --- Instances for GHC.Generics --- | @since base-4.9.0.0 -instance Foldable U1 where - foldMap _ _ = mempty - {-# INLINE foldMap #-} - fold _ = mempty - {-# INLINE fold #-} - foldr _ z _ = z - {-# INLINE foldr #-} - foldl _ z _ = z - {-# INLINE foldl #-} - foldl1 _ _ = errorWithoutStackTrace "foldl1: U1" - foldr1 _ _ = errorWithoutStackTrace "foldr1: U1" - length _ = 0 - null _ = True - elem _ _ = False - sum _ = 0 - product _ = 1 - --- | @since base-4.9.0.0 -deriving instance Foldable V1 - --- | @since base-4.9.0.0 -deriving instance Foldable Par1 - --- | @since base-4.9.0.0 -deriving instance Foldable f => Foldable (Rec1 f) - --- | @since base-4.9.0.0 -deriving instance Foldable (K1 i c) - --- | @since base-4.9.0.0 -deriving instance Foldable f => Foldable (M1 i c f) - --- | @since base-4.9.0.0 -deriving instance (Foldable f, Foldable g) => Foldable (f :+: g) - --- | @since base-4.9.0.0 -deriving instance (Foldable f, Foldable g) => Foldable (f :*: g) - --- | @since base-4.9.0.0 -deriving instance (Foldable f, Foldable g) => Foldable (f :.: g) - --- | @since base-4.9.0.0 -deriving instance Foldable UAddr - --- | @since base-4.9.0.0 -deriving instance Foldable UChar - --- | @since base-4.9.0.0 -deriving instance Foldable UDouble - --- | @since base-4.9.0.0 -deriving instance Foldable UFloat - --- | @since base-4.9.0.0 -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 ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Functor/Const.hs ===================================== @@ -29,7 +29,6 @@ import GHC.Internal.Ix (Ix) import GHC.Internal.Base import GHC.Internal.Enum (Bounded, Enum) import GHC.Internal.Float (Floating, RealFloat) -import GHC.Internal.Generics (Generic, Generic1) import GHC.Internal.Num (Num) import GHC.Internal.Real (Fractional, Integral, Real, RealFrac) import GHC.Internal.Read (Read(readsPrec), readParen, lex) @@ -57,8 +56,6 @@ newtype Const a b = Const { getConst :: a } , FiniteBits -- ^ @since base-4.9.0.0 , Floating -- ^ @since base-4.9.0.0 , Fractional -- ^ @since base-4.9.0.0 - , Generic -- ^ @since base-4.9.0.0 - , Generic1 -- ^ @since base-4.9.0.0 , Integral -- ^ @since base-4.9.0.0 , Ix -- ^ @since base-4.9.0.0 , Semigroup -- ^ @since base-4.9.0.0 ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Functor/Identity.hs ===================================== @@ -43,7 +43,6 @@ import GHC.Internal.Base ( Applicative(..), Eq(..), Functor(..), Monad(..) , Semigroup, Monoid, Ord(..), ($), (.) ) import GHC.Internal.Enum (Bounded, Enum) import GHC.Internal.Float (Floating, RealFloat) -import GHC.Internal.Generics (Generic, Generic1) import GHC.Internal.Num (Num) import GHC.Internal.Read (Read(..), lex, readParen) import GHC.Internal.Real (Fractional, Integral, Real, RealFrac) @@ -77,8 +76,6 @@ newtype Identity a = Identity { runIdentity :: a } , FiniteBits -- ^ @since base-4.9.0.0 , Floating -- ^ @since base-4.9.0.0 , Fractional -- ^ @since base-4.9.0.0 - , Generic -- ^ @since base-4.8.0.0 - , Generic1 -- ^ @since base-4.8.0.0 , Integral -- ^ @since base-4.9.0.0 , Ix -- ^ @since base-4.9.0.0 , Semigroup -- ^ @since base-4.9.0.0 ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Monoid.hs ===================================== @@ -1,4 +1,3 @@ -{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PolyKinds #-} @@ -85,7 +84,6 @@ module GHC.Internal.Data.Monoid ( -- Push down the module in the dependency hierarchy. import GHC.Internal.Base hiding (Any) import GHC.Internal.Enum -import GHC.Internal.Generics import GHC.Internal.Num import GHC.Internal.Read import GHC.Internal.Show @@ -148,8 +146,6 @@ newtype First a = First { getFirst :: Maybe a } , Ord -- ^ @since base-2.01 , Read -- ^ @since base-2.01 , Show -- ^ @since base-2.01 - , Generic -- ^ @since base-4.7.0.0 - , Generic1 -- ^ @since base-4.7.0.0 , Functor -- ^ @since base-4.8.0.0 , Applicative -- ^ @since base-4.8.0.0 , Monad -- ^ @since base-4.8.0.0 @@ -190,8 +186,6 @@ newtype Last a = Last { getLast :: Maybe a } , Ord -- ^ @since base-2.01 , Read -- ^ @since base-2.01 , Show -- ^ @since base-2.01 - , Generic -- ^ @since base-4.7.0.0 - , Generic1 -- ^ @since base-4.7.0.0 , Functor -- ^ @since base-4.8.0.0 , Applicative -- ^ @since base-4.8.0.0 , Monad -- ^ @since base-4.8.0.0 @@ -225,8 +219,6 @@ newtype Ap f a = Ap { getAp :: f a } , Enum -- ^ @since base-4.12.0.0 , Eq -- ^ @since base-4.12.0.0 , Functor -- ^ @since base-4.12.0.0 - , Generic -- ^ @since base-4.12.0.0 - , Generic1 -- ^ @since base-4.12.0.0 , Monad -- ^ @since base-4.12.0.0 , MonadFail -- ^ @since base-4.12.0.0 , MonadPlus -- ^ @since base-4.12.0.0 ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Semigroup/Internal.hs ===================================== @@ -1,6 +1,5 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE BangPatterns #-} -{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -26,7 +25,6 @@ import qualified GHC.Internal.List as List import GHC.Internal.Num import GHC.Internal.Read import GHC.Internal.Show -import GHC.Internal.Generics import GHC.Internal.Real -- | This is a valid definition of 'stimes' for an idempotent 'Semigroup'. @@ -90,8 +88,6 @@ newtype Dual a = Dual { getDual :: a } , Read -- ^ @since base-2.01 , Show -- ^ @since base-2.01 , Bounded -- ^ @since base-2.01 - , Generic -- ^ @since base-4.7.0.0 - , Generic1 -- ^ @since base-4.7.0.0 ) -- | @since base-4.9.0.0 @@ -130,8 +126,6 @@ instance Monad Dual where -- >>> appEndo computation 1 -- 6 newtype Endo a = Endo { appEndo :: a -> a } - deriving ( Generic -- ^ @since base-4.7.0.0 - ) -- | @since base-4.9.0.0 instance Semigroup (Endo a) where @@ -200,7 +194,6 @@ newtype All = All { getAll :: Bool } , Read -- ^ @since base-2.01 , Show -- ^ @since base-2.01 , Bounded -- ^ @since base-2.01 - , Generic -- ^ @since base-4.7.0.0 ) -- | @since base-4.9.0.0 @@ -232,7 +225,6 @@ newtype Any = Any { getAny :: Bool } , Read -- ^ @since base-2.01 , Show -- ^ @since base-2.01 , Bounded -- ^ @since base-2.01 - , Generic -- ^ @since base-4.7.0.0 ) -- | @since base-4.9.0.0 @@ -261,8 +253,6 @@ newtype Sum a = Sum { getSum :: a } , Read -- ^ @since base-2.01 , Show -- ^ @since base-2.01 , Bounded -- ^ @since base-2.01 - , Generic -- ^ @since base-4.7.0.0 - , Generic1 -- ^ @since base-4.7.0.0 , Num -- ^ @since base-4.7.0.0 ) @@ -309,8 +299,6 @@ newtype Product a = Product { getProduct :: a } , Read -- ^ @since base-2.01 , Show -- ^ @since base-2.01 , Bounded -- ^ @since base-2.01 - , Generic -- ^ @since base-4.7.0.0 - , Generic1 -- ^ @since base-4.7.0.0 , Num -- ^ @since base-4.7.0.0 ) @@ -355,9 +343,7 @@ instance Monad Product where -- -- @since base-4.8.0.0 newtype Alt f a = Alt {getAlt :: f a} - deriving ( Generic -- ^ @since base-4.8.0.0 - , Generic1 -- ^ @since base-4.8.0.0 - , Read -- ^ @since base-4.8.0.0 + deriving ( Read -- ^ @since base-4.8.0.0 , Show -- ^ @since base-4.8.0.0 , Eq -- ^ @since base-4.8.0.0 , Ord -- ^ @since base-4.8.0.0 ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Traversable.hs ===================================== @@ -51,8 +51,7 @@ import GHC.Internal.Data.Proxy ( Proxy(..) ) import GHC.Internal.Arr import GHC.Internal.Base ( Applicative(..), Monad(..), Monoid, Maybe(..), NonEmpty(..), - ($), (.), id, flip ) -import GHC.Internal.Generics + (.), id, flip, ($) ) import qualified GHC.Internal.List as List ( foldr ) import GHC.Internal.Tuple (Solo (..)) @@ -310,60 +309,6 @@ instance (Traversable f) => Traversable (Ap f) where deriving instance Traversable Identity --- Instances for GHC.Generics --- | @since base-4.9.0.0 -instance Traversable U1 where - traverse _ _ = pure U1 - {-# INLINE traverse #-} - sequenceA _ = pure U1 - {-# INLINE sequenceA #-} - mapM _ _ = pure U1 - {-# INLINE mapM #-} - sequence _ = pure U1 - {-# INLINE sequence #-} - --- | @since base-4.9.0.0 -deriving instance Traversable V1 - --- | @since base-4.9.0.0 -deriving instance Traversable Par1 - --- | @since base-4.9.0.0 -deriving instance Traversable f => Traversable (Rec1 f) - --- | @since base-4.9.0.0 -deriving instance Traversable (K1 i c) - --- | @since base-4.9.0.0 -deriving instance Traversable f => Traversable (M1 i c f) - --- | @since base-4.9.0.0 -deriving instance (Traversable f, Traversable g) => Traversable (f :+: g) - --- | @since base-4.9.0.0 -deriving instance (Traversable f, Traversable g) => Traversable (f :*: g) - --- | @since base-4.9.0.0 -deriving instance (Traversable f, Traversable g) => Traversable (f :.: g) - --- | @since base-4.9.0.0 -deriving instance Traversable UAddr - --- | @since base-4.9.0.0 -deriving instance Traversable UChar - --- | @since base-4.9.0.0 -deriving instance Traversable UDouble - --- | @since base-4.9.0.0 -deriving instance Traversable UFloat - --- | @since base-4.9.0.0 -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 ===================================== libraries/ghc-internal/src/GHC/Internal/Functor/ZipList.hs ===================================== @@ -1,13 +1,11 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DeriveFunctor #-} -{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveFoldable #-} module GHC.Internal.Functor.ZipList (ZipList(..)) where import GHC.Internal.Base -import GHC.Internal.Generics import GHC.Internal.List (repeat, zipWith) import GHC.Internal.Read (Read) import GHC.Internal.Show (Show) @@ -41,8 +39,6 @@ newtype ZipList a = ZipList { getZipList :: [a] } , Read -- ^ @since base-4.7.0.0 , Functor -- ^ @since base-2.01 , Foldable -- ^ @since base-4.9.0.0 - , Generic -- ^ @since base-4.7.0.0 - , Generic1 -- ^ @since base-4.7.0.0 ) ===================================== libraries/ghc-internal/src/GHC/Internal/Generics.hs ===================================== @@ -3,7 +3,9 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFunctor #-} +{-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE EmptyDataDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} @@ -736,13 +738,13 @@ 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(..) ) -import GHC.Internal.Types +import GHC.Internal.Types hiding (Any) -- clashes with the Semigroup -- Needed for instances import GHC.Internal.Ix ( Ix ) import GHC.Internal.Base ( Alternative(..), Applicative(..), Functor(..) , Monad(..), MonadPlus(..), NonEmpty(..), String, coerce - , Semigroup(..), Monoid(..), Void ) + , Semigroup(..), Void, errorWithoutStackTrace, liftM2 ) import GHC.Internal.Classes ( Eq(..), Ord(..) ) import GHC.Internal.Enum ( Bounded, Enum ) import GHC.Internal.Read ( Read(..) ) @@ -751,6 +753,15 @@ import GHC.Internal.Stack.Types ( SrcLoc(..) ) import GHC.Internal.Tuple (Solo (..)) import GHC.Internal.Unicode ( GeneralCategory(..) ) import GHC.Internal.Fingerprint.Type ( Fingerprint(..) ) +import GHC.Internal.Data.Semigroup.Internal +import GHC.Internal.Data.Monoid +import GHC.Internal.Data.Foldable +import GHC.Internal.Data.Traversable +import GHC.Internal.Data.Functor.Const +import GHC.Internal.Data.Functor.Identity +import GHC.Internal.Functor.ZipList +import GHC.Internal.IO.Exception ( ExitCode(..) ) +import GHC.Internal.ByteOrder ( ByteOrder(..) ) -- Needed for metadata import GHC.Internal.Data.Proxy ( Proxy(..) ) @@ -1879,3 +1890,191 @@ instance SingKind DecidedStrictness where fromSing SDecidedLazy = DecidedLazy fromSing SDecidedStrict = DecidedStrict fromSing SDecidedUnpack = DecidedUnpack + +-- | @since base-4.7.0.0 +deriving instance Generic (Dual a) + +-- | @since base-4.7.0.0 +deriving instance Generic1 Dual + +-- | @since base-4.7.0.0 +deriving instance Generic (Endo a) + +-- | @since base-4.7.0.0 +deriving instance Generic All + +-- | @since base-4.7.0.0 +deriving instance Generic Any + +-- | @since base-4.7.0.0 +deriving instance Generic (Sum a) + +-- | @since base-4.7.0.0 +deriving instance Generic1 Sum + +-- | @since base-4.7.0.0 +deriving instance Generic (Product a) + +-- | @since base-4.7.0.0 +deriving instance Generic1 Product + +-- | @since base-4.8.0.0 +deriving instance Generic (Alt f a) + +-- | @since base-4.8.0.0 +deriving instance Generic1 (Alt f) + +-- | @since base-4.7.0.0 +deriving instance Generic (First a) + +-- | @since base-4.7.0.0 +deriving instance Generic1 First + +-- | @since base-4.7.0.0 +deriving instance Generic (Last a) + +-- | @since base-4.7.0.0 +deriving instance Generic1 Last + +-- | @since base-4.12.0.0 +deriving instance Generic (Ap f a) + +-- | @since base-4.12.0.0 +deriving instance Generic1 (Ap f) + +-- | @since base-4.9.0.0 +instance Foldable U1 where + foldMap _ _ = mempty + {-# INLINE foldMap #-} + fold _ = mempty + {-# INLINE fold #-} + foldr _ z _ = z + {-# INLINE foldr #-} + foldl _ z _ = z + {-# INLINE foldl #-} + foldl1 _ _ = errorWithoutStackTrace "foldl1: U1" + foldr1 _ _ = errorWithoutStackTrace "foldr1: U1" + length _ = 0 + null _ = True + elem _ _ = False + sum _ = 0 + product _ = 1 + +-- | @since base-4.9.0.0 +deriving instance Foldable V1 + +-- | @since base-4.9.0.0 +deriving instance Foldable Par1 + +-- | @since base-4.9.0.0 +deriving instance Foldable f => Foldable (Rec1 f) + +-- | @since base-4.9.0.0 +deriving instance Foldable (K1 i c) + +-- | @since base-4.9.0.0 +deriving instance Foldable f => Foldable (M1 i c f) + +-- | @since base-4.9.0.0 +deriving instance (Foldable f, Foldable g) => Foldable (f :+: g) + +-- | @since base-4.9.0.0 +deriving instance (Foldable f, Foldable g) => Foldable (f :*: g) + +-- | @since base-4.9.0.0 +deriving instance (Foldable f, Foldable g) => Foldable (f :.: g) + +-- | @since base-4.9.0.0 +deriving instance Foldable UAddr + +-- | @since base-4.9.0.0 +deriving instance Foldable UChar + +-- | @since base-4.9.0.0 +deriving instance Foldable UDouble + +-- | @since base-4.9.0.0 +deriving instance Foldable UFloat + +-- | @since base-4.9.0.0 +deriving instance Foldable UInt + +-- | @since base-4.9.0.0 +deriving instance Foldable UWord + +-- | @since base-4.9.0.0 +instance Traversable U1 where + traverse _ _ = pure U1 + {-# INLINE traverse #-} + sequenceA _ = pure U1 + {-# INLINE sequenceA #-} + mapM _ _ = pure U1 + {-# INLINE mapM #-} + sequence _ = pure U1 + {-# INLINE sequence #-} + +-- | @since base-4.9.0.0 +deriving instance Traversable V1 + +-- | @since base-4.9.0.0 +deriving instance Traversable Par1 + +-- | @since base-4.9.0.0 +deriving instance Traversable f => Traversable (Rec1 f) + +-- | @since base-4.9.0.0 +deriving instance Traversable (K1 i c) + +-- | @since base-4.9.0.0 +deriving instance Traversable f => Traversable (M1 i c f) + +-- | @since base-4.9.0.0 +deriving instance (Traversable f, Traversable g) => Traversable (f :+: g) + +-- | @since base-4.9.0.0 +deriving instance (Traversable f, Traversable g) => Traversable (f :*: g) + +-- | @since base-4.9.0.0 +deriving instance (Traversable f, Traversable g) => Traversable (f :.: g) + +-- | @since base-4.9.0.0 +deriving instance Traversable UAddr + +-- | @since base-4.9.0.0 +deriving instance Traversable UChar + +-- | @since base-4.9.0.0 +deriving instance Traversable UDouble + +-- | @since base-4.9.0.0 +deriving instance Traversable UFloat + +-- | @since base-4.9.0.0 +deriving instance Traversable UInt + +-- | @since base-4.9.0.0 +deriving instance Traversable UWord + +-- | @since base-4.9.0.0 +deriving instance Generic (Const a b) + +-- | @since base-4.9.0.0 +deriving instance Generic1 (Const a) + +-- | @since base-4.8.0.0 +deriving instance Generic (Identity a) + +-- | @since base-4.8.0.0 +deriving instance Generic1 Identity + +-- | @since base-4.7.0.0 +deriving instance Generic (ZipList a) + +-- | @since base-4.7.0.0 +deriving instance Generic1 ZipList + +-- TODO: since when?? +deriving instance Generic ExitCode + +-- | @since base-4.15.0.0 +deriving instance Generic ByteOrder ===================================== libraries/ghc-internal/src/GHC/Internal/IO/Exception.hs ===================================== @@ -1,5 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE DeriveGeneric, NoImplicitPrelude, MagicHash, +{-# LANGUAGE NoImplicitPrelude, MagicHash, ExistentialQuantification, ImplicitParams #-} {-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_HADDOCK not-home #-} @@ -52,7 +52,6 @@ module GHC.Internal.IO.Exception ( ) where import GHC.Internal.Base -import GHC.Internal.Generics import GHC.Internal.List import GHC.Internal.IO import GHC.Internal.Show @@ -306,7 +305,7 @@ data ExitCode -- The exact interpretation of the code is -- operating-system dependent. In particular, some values -- may be prohibited (e.g. 0 on a POSIX-compliant system). - deriving (Eq, Ord, Read, Show, Generic) + deriving (Eq, Ord, Read, Show) -- | @since base-4.1.0.0 instance Exception ExitCode ===================================== libraries/ghc-internal/src/GHC/Internal/Read.hs ===================================== @@ -74,6 +74,7 @@ import GHC.Internal.Arr import GHC.Internal.Word import GHC.Internal.List (filter) import GHC.Internal.Tuple (Solo (..)) +import GHC.Internal.ByteOrder -- | @'readParen' 'True' p@ parses what @p@ parses, but surrounded with @@ -833,3 +834,6 @@ instance (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, ; return (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) }) readListPrec = readListPrecDefault readList = readListDefault + +-- | @since base-4.11.0.0 +deriving instance Read ByteOrder ===================================== libraries/ghc-internal/src/GHC/Internal/Unicode/Bits.hs ===================================== @@ -31,7 +31,7 @@ module GHC.Internal.Unicode.Bits where import GHC.Internal.Bits (finiteBitSize, popCount) -import {-# SOURCE #-} GHC.Internal.ByteOrder +import GHC.Internal.ByteOrder import GHC.Internal.Prim import GHC.Internal.ST import GHC.Internal.Base View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/316765d2128789be4ad1042d0214c8dc... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/316765d2128789be4ad1042d0214c8dc... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Teo Camarasu (@teo)