Commits

Bryan O'Sullivan committed a0b7ed3

Derive Typeable

Comments (0)

Files changed (1)

Data/Text/Internal.hs

+{-# LANGUAGE DeriveDataTypeable #-}
+
 module Data.Text.Internal
     (
       Text(..)
 
 import Data.Array.ST (newArray_,runSTUArray)
 import Data.Array.Unboxed (UArray)
+import Data.Typeable (Typeable)
 import Data.Word (Word16)
 
-data Text = Text !(UArray Int Word16) {-# UNPACK #-}!Int {-# UNPACK #-}!Int
+data Text = Text {-# UNPACK #-} !(UArray Int Word16) -- payload
+                 {-# UNPACK #-} !Int                 -- offset
+                 {-# UNPACK #-} !Int                 -- length
+            deriving (Typeable)
 
 empty :: Text
 empty = Text (runSTUArray (newArray_ (0,0))) 0 0