diff --git a/utf8-string.cabal b/utf8-string.cabal index 9cda68ccce4e0173bb6dc10aa3780038971bd7e2..34b0d46d371cac4058d464a00109ce4c2e7e08d3 100644 --- a/utf8-string.cabal +++ b/utf8-string.cabal @@ -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