--- haskell-text-0.7.0.1/Data/Text.hs	2009-12-23 11:48:15.000000000 -0600
+++ haskell-text-0.7.0.1.new/Data/Text.hs	2010-01-26 11:50:11.000000000 -0600
@@ -166,12 +166,13 @@
                 Eq(..), Ord(..), (++),
                 Read(..), Show(..),
                 (&&), (||), (+), (-), (.), ($), (>>), (*),
-                div, not, return, otherwise)
+                div, error, not, return, otherwise)
 #if defined(HAVE_DEEPSEQ)
 import Control.DeepSeq (NFData)
 #endif
 import Control.Exception (assert)
 import Data.Char (isSpace)
+import Data.Data (Data(gfoldl, toConstr, gunfold, dataTypeOf), mkNoRepType)
 import Control.Monad (foldM)
 import Control.Monad.ST (ST)
 import qualified Data.Text.Array as A
@@ -221,6 +222,15 @@
 instance NFData Text
 #endif
 
+-- This instance preserves data abstraction at the cost of inefficiency.
+-- We omit reflection services for the sake of data abstraction.
+
+instance Data Text where
+  gfoldl f z txt = z pack `f` (unpack txt)
+  toConstr _     = error "toConstr"
+  gunfold _ _    = error "gunfold"
+  dataTypeOf _   = mkNoRepType "Data.Text.Text"
+
 -- -----------------------------------------------------------------------------
 -- * Conversion to/from 'Text'
 
