Skip to content

Commit 82d8ecb

Browse files
BodigrimLysxia
authored andcommitted
Deriving Typeable has no effect: all types now auto-derive Typeable (-Wderiving-typeable)
1 parent e1e11f2 commit 82d8ecb

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

src/Data/Text/Encoding/Error.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE CPP, DeriveDataTypeable #-}
1+
{-# LANGUAGE CPP #-}
22
{-# LANGUAGE Safe #-}
33
-- |
44
-- Module : Data.Text.Encoding.Error
@@ -36,7 +36,6 @@ module Data.Text.Encoding.Error
3636

3737
import Control.DeepSeq (NFData (..))
3838
import Control.Exception (Exception, throw)
39-
import Data.Typeable (Typeable)
4039
import Data.Word (Word8)
4140
import Numeric (showHex)
4241

@@ -74,7 +73,7 @@ data UnicodeException =
7473
| EncodeError String (Maybe Char)
7574
-- ^ Tried to encode a character that could not be represented
7675
-- under the given encoding, or ran out of input in mid-encode.
77-
deriving (Eq, Typeable)
76+
deriving (Eq)
7877

7978
{-# DEPRECATED EncodeError "This constructor is never used, and will be removed." #-}
8079

src/Data/Text/Internal.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{-# LANGUAGE BangPatterns #-}
22
{-# LANGUAGE CPP #-}
3-
{-# LANGUAGE DeriveDataTypeable #-}
43
{-# LANGUAGE RankNTypes #-}
54
{-# LANGUAGE UnboxedTuples #-}
65
{-# OPTIONS_HADDOCK not-home #-}
@@ -58,15 +57,13 @@ import Control.Monad.ST (ST, runST)
5857
import Data.Bits
5958
import Data.Int (Int32, Int64)
6059
import Data.Text.Internal.Unsafe.Char (ord, unsafeWrite)
61-
import Data.Typeable (Typeable)
6260
import qualified Data.Text.Array as A
6361

6462
-- | A space efficient, packed, unboxed Unicode text type.
6563
data Text = Text
6664
{-# UNPACK #-} !A.Array -- ^ bytearray encoded as UTF-8
6765
{-# UNPACK #-} !Int -- ^ offset in bytes (not in Char!), pointing to a start of UTF-8 sequence
6866
{-# UNPACK #-} !Int -- ^ length in bytes (not in Char!), pointing to an end of UTF-8 sequence
69-
deriving (Typeable)
7067

7168
-- | Type synonym for the strict flavour of 'Text'.
7269
type StrictText = Text

src/Data/Text/Internal/Lazy.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE BangPatterns, DeriveDataTypeable #-}
1+
{-# LANGUAGE BangPatterns #-}
22
{-# OPTIONS_HADDOCK not-home #-}
33

44
-- |
@@ -43,7 +43,6 @@ module Data.Text.Internal.Lazy
4343

4444
import Data.Bits (shiftL)
4545
import Data.Text ()
46-
import Data.Typeable (Typeable)
4746
import Foreign.Storable (sizeOf)
4847
import qualified Data.Text.Array as A
4948
import qualified Data.Text.Internal as T
@@ -55,7 +54,6 @@ data Text = Empty
5554
-- @since 2.1.2
5655
| Chunk {-# UNPACK #-} !T.Text Text
5756
-- ^ Chunks must be non-empty, this invariant is not checked.
58-
deriving (Typeable)
5957

6058
-- | Type synonym for the lazy flavour of 'Text'.
6159
type LazyText = Text

src/Data/Text/Lazy/Internal.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE BangPatterns, DeriveDataTypeable #-}
21
-- |
32
-- Module : Data.Text.Lazy.Internal
43
-- Copyright : (c) 2013 Bryan O'Sullivan

0 commit comments

Comments
 (0)