Commits

Bryan O'Sullivan committed 6963e28

Get the code compiling under GHC 6.8.3.

Comments (0)

Files changed (4)

-{-# LANGUAGE BangPatterns, Rank2Types #-}
+{-# LANGUAGE BangPatterns, CPP, Rank2Types #-}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 
 -- |
                 Read(..), Show(..),
                 (&&), (||), (+), (-), (.), ($), (>>), (*),
                 div, not, return, otherwise)
+#if defined(HAVE_DEEPSEQ)
 import Control.DeepSeq (NFData)
+#endif
 import Control.Exception (assert)
 import Data.Char (isSpace)
 import Control.Monad (foldM)
 instance IsString Text where
     fromString = pack
 
+#if defined(HAVE_DEEPSEQ)
 instance NFData Text
+#endif
 
 -- -----------------------------------------------------------------------------
 -- * Conversion to/from 'Text'

Data/Text/Encoding/Error.hs

-{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE CPP, DeriveDataTypeable #-}
 -- |
 -- Module      : Data.Text.Encoding.Error
 -- Copyright   : (c) Bryan O'Sullivan 2009
     , replace
     ) where
 
+#if __GLASGOW_HASKELL__ >= 610
 import Control.Exception (Exception, throw)
+#else
+import Control.Exception.Extensible (Exception, throw)
+#endif
 import Data.Typeable (Typeable)
 import Data.Word (Word8)
 import Numeric (showHex)

Data/Text/Lazy.hs

 {-# OPTIONS_GHC -fno-warn-orphans #-}
-{-# LANGUAGE BangPatterns #-}
+{-# LANGUAGE BangPatterns, CPP #-}
 -- |
 -- Module      : Data.Text.Lazy
 -- Copyright   : (c) Bryan O'Sullivan 2009
                 (&&), (+), (-), (.), ($), (++),
                 div, flip, fromIntegral, not, otherwise)
 import qualified Prelude as P
+#if defined(HAVE_DEEPSEQ)
 import Control.DeepSeq (NFData(..))
+#endif
 import Data.Int (Int64)
 import qualified Data.List as L
 import Data.Char (isSpace)
 instance IsString Text where
     fromString = pack
 
+#if defined(HAVE_DEEPSEQ)
 instance NFData Text where
     rnf Empty        = ()
     rnf (Chunk _ ts) = rnf ts
+#endif
 
 -- | /O(n)/ Convert a 'String' into a 'Text'.
 --
 name:           text
-version:        0.7
+version:        0.7.0.1
 synopsis:       An efficient packed Unicode text type
 description:    An efficient packed Unicode text type.
 license:        BSD3
 
   build-depends:
     base       < 5,
-    bytestring >= 0.9 && < 1.0,
-    deepseq    >= 1.1.0.0
+    bytestring >= 0.9 && < 1.0
   if impl(ghc >= 6.10)
     build-depends:
-      ghc-prim, base >= 4
+      ghc-prim, base >= 4, deepseq >= 1.1.0.0
+    cpp-options: -DHAVE_DEEPSEQ
+  else
+    build-depends: extensible-exceptions
+    ghc-options: -XPatternSignatures
 
   -- gather extensive profiling data for now
   ghc-prof-options: -auto-all
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.