on master help sign in
Data Text: Used mispelled mkNorepType for compatibility with GHC 6.10
698fa0cJeremy Shaw
Data/Text.hs+5−2
@@ -172,7 +172,7 @@ import Control.DeepSeq (NFData)
172#endif
172#endif
173import Control.Exception (assert)
173import Control.Exception (assert)
174import Data.Char (isSpace)
174import Data.Char (isSpace)
175−import Data.Data (Data(gfoldl, toConstr, gunfold, dataTypeOf), mkNoRepType)
175+import Data.Data (Data(gfoldl, toConstr, gunfold, dataTypeOf), mkNorepType)
176import Control.Monad (foldM)
176import Control.Monad (foldM)
177import Control.Monad.ST (ST)
177import Control.Monad.ST (ST)
178import qualified Data.Text.Array as A
178import qualified Data.Text.Array as A
@@ -234,11 +234,14 @@ instance NFData Text
234-- "could we get a Data instance for Data.Text.Text?"
234-- "could we get a Data instance for Data.Text.Text?"
235-- http://groups.google.com/group/haskell-cafe/browse_thread/thread/b5bbb1b28a7e525d/0639d46852575b93
235-- http://groups.google.com/group/haskell-cafe/browse_thread/thread/b5bbb1b28a7e525d/0639d46852575b93
236--
236--
237+-- NOTE: we used the mispelled version of mkNoRepType for
238+-- compatibility with GHC 6.10. Eventually this should be updated:
239+-- http://hackage.haskell.org/trac/ghc/ticket/2760
237instance Data Text where
240instance Data Text where
238 gfoldl f z txt = z pack `f` (unpack txt)
241 gfoldl f z txt = z pack `f` (unpack txt)
239 toConstr _ = error "Data.Text.Text:toConstr"
242 toConstr _ = error "Data.Text.Text:toConstr"
240 gunfold _ _ = error "Data.Text.Text:gunfold"
243 gunfold _ _ = error "Data.Text.Text:gunfold"
241− dataTypeOf _ = mkNoRepType "Data.Text.Text"
244+ dataTypeOf _ = mkNorepType "Data.Text.Text"
242
245
243-- -----------------------------------------------------------------------------
246-- -----------------------------------------------------------------------------
244-- * Conversion to/from 'Text'
247-- * Conversion to/from 'Text'