string-conv 0.1 → 0.1.1
raw patch · 4 files changed
+35/−5 lines, 4 filesnew-uploader
Files
- Data/String/Conv.hs +2/−2
- README.md +12/−0
- changelog.md +9/−0
- string-conv.cabal +12/−3
Data/String/Conv.hs view
@@ -95,14 +95,14 @@ -- | Convenience helper for dispatching based on leniency. decodeUtf8T :: Leniency -> B.ByteString -> T.Text decodeUtf8T Lenient = T.decodeUtf8With T.lenientDecode-decodeUtf8T Strict = T.decodeUtf8With T.lenientDecode+decodeUtf8T Strict = T.decodeUtf8With T.strictDecode ------------------------------------------------------------------------------ -- | Convenience helper for dispatching based on leniency. decodeUtf8LT :: Leniency -> LB.ByteString -> LT.Text decodeUtf8LT Lenient = LT.decodeUtf8With T.lenientDecode-decodeUtf8LT Strict = LT.decodeUtf8With T.lenientDecode+decodeUtf8LT Strict = LT.decodeUtf8With T.strictDecode ------------------------------------------------------------------------------
+ README.md view
@@ -0,0 +1,12 @@+# string-conv++A type class to standardize string conversions. With this type class you only+need to remember one function for converting between any two string variants.+This package includes support for String, ByteString, and Text as well as the+Lazy and Strict variants where necessary.++StringConv's `toS` function is most useful when you have a fully defined+string conversion with a fixed (non-polymorphic) input and output type. Of+course you can still use it when you don't have a fixed type. In that case+you might need to specify a type class constraint such as `StringConv s+String`.
+ changelog.md view
@@ -0,0 +1,9 @@+0.1.1+=====+* Fixed bug where decoding text from bytestrings would always decode+ leniently, even if Strict was used.++0.1+===++* Initial release
string-conv.cabal view
@@ -1,5 +1,5 @@ name: string-conv-version: 0.1+version: 0.1.1 synopsis: Standardized conversion between string types description: Avoids the need to remember many different functions for converting string types. Just use one universal@@ -10,10 +10,19 @@ maintainer: ozgun.ataman@soostone.com copyright: Soostone Inc, 2012-2015 category: Data, String, Text+homepage: https://github.com/Soostone/string-conv+bug-reports: https://github.com/Soostone/string-conv/issues build-type: Simple cabal-version: >=1.8+extra-source-files:+ README.md+ changelog.md +source-repository head+ type: git+ location: https://github.com/Soostone/string-conv.git+ library exposed-modules: Data.String.Conv- build-depends: base >= 4 && < 5, bytestring, text- ghc-options: -Wall -O2+ build-depends: base >= 4.4 && < 5, bytestring, text+ ghc-options: -Wall