diff options
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/Data/Semigroup.hs | 14 | ||||
-rw-r--r-- | libraries/base/GHC/Exception.hs | 6 |
2 files changed, 9 insertions, 11 deletions
diff --git a/libraries/base/Data/Semigroup.hs b/libraries/base/Data/Semigroup.hs index 518e215661..1f4944a411 100644 --- a/libraries/base/Data/Semigroup.hs +++ b/libraries/base/Data/Semigroup.hs @@ -290,7 +290,7 @@ instance Semigroup (NonEmpty a) where newtype Min a = Min { getMin :: a } - deriving (Eq, Ord, Show, Read, Data, Typeable, Generic, Generic1) + deriving (Eq, Ord, Show, Read, Data, Generic, Generic1) instance Bounded a => Bounded (Min a) where minBound = Min minBound @@ -347,7 +347,7 @@ instance Num a => Num (Min a) where fromInteger = Min . fromInteger newtype Max a = Max { getMax :: a } - deriving (Eq, Ord, Show, Read, Data, Typeable, Generic, Generic1) + deriving (Eq, Ord, Show, Read, Data, Generic, Generic1) instance Bounded a => Bounded (Max a) where minBound = Max minBound @@ -405,7 +405,7 @@ instance Num a => Num (Max a) where -- | 'Arg' isn't itself a 'Semigroup' in its own right, but it can be -- placed inside 'Min' and 'Max' to compute an arg min or arg max. data Arg a b = Arg a b deriving - (Show, Read, Data, Typeable, Generic, Generic1) + (Show, Read, Data, Generic, Generic1) type ArgMin a b = Min (Arg a b) type ArgMax a b = Max (Arg a b) @@ -437,7 +437,7 @@ instance Bifunctor Arg where -- | Use @'Option' ('First' a)@ to get the behavior of -- 'Data.Monoid.First' from "Data.Monoid". newtype First a = First { getFirst :: a } deriving - (Eq, Ord, Show, Read, Data, Typeable, Generic, Generic1) + (Eq, Ord, Show, Read, Data, Generic, Generic1) instance Bounded a => Bounded (First a) where minBound = First minBound @@ -482,7 +482,7 @@ instance MonadFix First where -- | Use @'Option' ('Last' a)@ to get the behavior of -- 'Data.Monoid.Last' from "Data.Monoid" newtype Last a = Last { getLast :: a } deriving - (Eq, Ord, Show, Read, Data, Typeable, Generic, Generic1) + (Eq, Ord, Show, Read, Data, Generic, Generic1) instance Bounded a => Bounded (Last a) where minBound = Last minBound @@ -527,7 +527,7 @@ instance MonadFix Last where -- | Provide a Semigroup for an arbitrary Monoid. newtype WrappedMonoid m = WrapMonoid { unwrapMonoid :: m } - deriving (Eq, Ord, Show, Read, Data, Typeable, Generic, Generic1) + deriving (Eq, Ord, Show, Read, Data, Generic, Generic1) instance Monoid m => Semigroup (WrappedMonoid m) where (<>) = coerce (mappend :: m -> m -> m) @@ -570,7 +570,7 @@ mtimesDefault n x -- Ideally, this type would not exist at all and we would just fix the -- 'Monoid' instance of 'Maybe' newtype Option a = Option { getOption :: Maybe a } - deriving (Eq, Ord, Show, Read, Data, Typeable, Generic, Generic1) + deriving (Eq, Ord, Show, Read, Data, Generic, Generic1) instance Functor Option where fmap f (Option a) = Option (fmap f a) diff --git a/libraries/base/GHC/Exception.hs b/libraries/base/GHC/Exception.hs index be9e6f956c..aeaef20805 100644 --- a/libraries/base/GHC/Exception.hs +++ b/libraries/base/GHC/Exception.hs @@ -59,7 +59,7 @@ instance of the @Exception@ class. The simplest case is a new exception type directly below the root: > data MyException = ThisException | ThatException -> deriving (Show, Typeable) +> deriving Show > > instance Exception MyException @@ -79,7 +79,6 @@ of exceptions: > -- Make the root exception type for all the exceptions in a compiler > > data SomeCompilerException = forall e . Exception e => SomeCompilerException e -> deriving Typeable > > instance Show SomeCompilerException where > show (SomeCompilerException e) = show e @@ -98,7 +97,6 @@ of exceptions: > -- Make a subhierarchy for exceptions in the frontend of the compiler > > data SomeFrontendException = forall e . Exception e => SomeFrontendException e -> deriving Typeable > > instance Show SomeFrontendException where > show (SomeFrontendException e) = show e @@ -119,7 +117,7 @@ of exceptions: > -- Make an exception type for a particular frontend compiler exception > > data MismatchedParentheses = MismatchedParentheses -> deriving (Typeable, Show) +> deriving Show > > instance Exception MismatchedParentheses where > toException = frontendExceptionToException |