on master help sign in
Derive Typeable

--HG-- extra : convert_revision : 9bc74b29e181bb9deec208d4a40cef4e391ba301

commitfa8e827e4d11c37c20e14cf9ba05cb1f1aa2c04f authorBryan O'Sullivan <bos@serpentine.com> dateTue 20 Jan 2009, 07:44 (18 years ago) parent0ef2424
1 file changed+7−1
Data/Text/Internal.hs+7−1
Data/Text/Internal.hs+7−1
@@ -1,3 +1,5 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+
13module Data.Text.Internal
24 (
35 Text(..)
@@ -6,9 +8,13 @@ module Data.Text.Internal
68
79import Data.Array.ST (newArray_,runSTUArray)
810import Data.Array.Unboxed (UArray)
11+import Data.Typeable (Typeable)
912import Data.Word (Word16)
1013
11−data Text = Text !(UArray Int Word16) {-# UNPACK #-}!Int {-# UNPACK #-}!Int
14+data Text = Text {-# UNPACK #-} !(UArray Int Word16) -- payload
15+ {-# UNPACK #-} !Int -- offset
16+ {-# UNPACK #-} !Int -- length
17+ deriving (Typeable)
1218
1319empty :: Text
1420empty = Text (runSTUArray (newArray_ (0,0))) 0 0