Port to small-base v0.3.1.1
authorDon Stewart <dons@galois.com>
Tue, 1 Jul 2008 17:07:10 +0000 (10:07 -0700)
committerDon Stewart <dons@galois.com>
Tue, 1 Jul 2008 17:07:10 +0000 (10:07 -0700)
darcs-hash:20080701170710-cba2c-e1b77ce9b1098c46e761553951a1e09d9fd64fab.gz

utf8-string.cabal

index 9cda68c..34b0d46 100644 (file)
@@ -1,5 +1,5 @@
 Name:               utf8-string
-Version:            0.3.1
+Version:            0.3.1.1
 Author:             Eric Mertens
 Maintainer:         emertens@galois.com
 License:            BSD3
@@ -11,12 +11,22 @@ Description:        A UTF8 layer for IO and Strings. The utf8-string
                     strings to Word8 lists and back, and for reading and
                     writing UTF8 without truncation.
 Category:           Codec
-Build-depends:      base>=1.0, bytestring>=0.9
-Ghc-options:        -W -O2
 Build-type:         Simple
-Exposed-modules:    Codec.Binary.UTF8.String
-                    Codec.Binary.UTF8.Generic
-                    System.IO.UTF8
-                    Data.String.UTF8
-                    Data.ByteString.UTF8
-                    Data.ByteString.Lazy.UTF8
+cabal-version:      >= 1.2
+
+flag bytestring-in-base
+
+library
+  Ghc-options:        -W -O2
+
+  if flag(bytestring-in-base)
+    build-depends: base >= 2.0 && < 2.2
+  else
+    build-depends: base < 2.0 || >= 3, bytestring >= 0.9
+
+  Exposed-modules:    Codec.Binary.UTF8.String
+                      Codec.Binary.UTF8.Generic
+                      System.IO.UTF8
+                      Data.String.UTF8
+                      Data.ByteString.UTF8
+                      Data.ByteString.Lazy.UTF8