Bump in fork
[packages/binary.git] / binary.cabal
index 7354219..b6bcb16 100644 (file)
@@ -1,23 +1,65 @@
 name:            binary
-version:         0.4
+version:         0.5
 license:         BSD3
 license-file:    LICENSE
 author:          Lennart Kolmodin <kolmodin@dtek.chalmers.se>
 maintainer:      Lennart Kolmodin, Don Stewart <dons@galois.com>
-homepage:        http://www.cse.unsw.edu.au/~dons/binary.html
+homepage:        http://code.haskell.org/binary/
 description:     Efficient, pure binary serialisation using lazy ByteStrings.
-                 Haskell values may be encoded to and form binary formats, 
-                 written to disk as binary, or set over the network.
-synopsis:        Binary serialization for Haskell values using lazy ByteStrings
+                 Haskell values may be encoded to and from binary formats, 
+                 written to disk as binary, or sent over the network.
+                 Serialisation speeds of over 1 G\/sec have been observed,
+                 so this library should be suitable for high performance
+                 scenarios.
+synopsis:        Binary serialisation for Haskell values using lazy ByteStrings
 category:        Data, Parsing
-build-depends:   base, containers, array, bytestring>=0.9
 stability:       provisional
--- ghc 6.4 also needs package fps
-exposed-modules: Data.Binary,
-                 Data.Binary.Put,
-                 Data.Binary.Get,
-                 Data.Binary.Builder
-extensions:      CPP,FlexibleContexts
-hs-source-dirs:  src
-ghc-options:     -O2 -Wall -fliberate-case-threshold=1000
-extra-source-files: README 
+build-type:      Simple
+cabal-version:   >= 1.2
+tested-with:     GHC ==6.4.2, GHC ==6.6.1, GHC ==6.8.0, GHC ==6.10.1
+extra-source-files: README index.html
+
+flag bytestring-in-base
+flag split-base
+flag applicative-in-base
+
+library
+  if flag(bytestring-in-base)
+    -- bytestring was in base-2.0 and 2.1.1
+    build-depends: base >= 2.0 && < 2.2
+    cpp-options: -DBYTESTRING_IN_BASE
+  else
+    -- in base 1.0 and 3.0 bytestring is a separate package
+    build-depends: base < 2.0 || >= 3, bytestring >= 0.9
+
+  if flag(split-base)
+    build-depends:   base >= 3.0, containers, array
+  else
+    build-depends:   base < 3.0
+
+  if flag(applicative-in-base)
+    build-depends: base >= 2.0
+    cpp-options: -DAPPLICATIVE_IN_BASE
+  else
+    build-depends: base < 2.0
+  hs-source-dirs:  src
+
+  exposed-modules: Data.Binary,
+                   Data.Binary.Put,
+                   Data.Binary.Get,
+                   Data.Binary.Builder
+
+  extensions:      CPP,
+                   FlexibleContexts
+
+  ghc-options:     -O2
+                   -Wall
+                   -fspec-constr
+                   -funbox-strict-fields 
+                   -fdicts-cheap
+                   -fno-method-sharing
+                   -fliberate-case-threshold=1000
+                   -fmax-simplifier-iterations10
+
+--  if impl(ghc < 6.5)
+--    ghc-options:   -fallow-undecidable-instances