@@ -1,5 +1,5 @@
1{-# OPTIONS_GHC -fno-warn-orphans #-}
1{-# OPTIONS_GHC -fno-warn-orphans #-}
2−{-# LANGUAGE BangPatterns #-}
2+{-# LANGUAGE BangPatterns, CPP #-}
4-- Module : Data.Text.Lazy
4-- Module : Data.Text.Lazy
5-- Copyright : (c) Bryan O'Sullivan 2009
5-- Copyright : (c) Bryan O'Sullivan 2009
@@ -169,7 +169,9 @@ import Prelude (Char, Bool(..), Maybe(..), String,
169 (&&), (+), (-), (.), ($), (++),
169 (&&), (+), (-), (.), ($), (++),
170 div, flip, fromIntegral, not, otherwise)
170 div, flip, fromIntegral, not, otherwise)
171import qualified Prelude as P
171import qualified Prelude as P
172+#if defined(HAVE_DEEPSEQ)
172import Control.DeepSeq (NFData(..))
173import Control.DeepSeq (NFData(..))
173import Data.Int (Int64)
175import Data.Int (Int64)
174import qualified Data.List as L
176import qualified Data.List as L
175import Data.Char (isSpace)
177import Data.Char (isSpace)
@@ -208,9 +210,11 @@ instance Monoid Text where
208instance IsString Text where
210instance IsString Text where
209 fromString = pack
211 fromString = pack
213+#if defined(HAVE_DEEPSEQ)
211instance NFData Text where
214instance NFData Text where
212 rnf Empty = ()
215 rnf Empty = ()
213 rnf (Chunk _ ts) = rnf ts
216 rnf (Chunk _ ts) = rnf ts
215-- | /O(n)/ Convert a 'String' into a 'Text'.
219-- | /O(n)/ Convert a 'String' into a 'Text'.