text-conversions 0.3.1 → 0.3.1.1
raw patch · 6 files changed
+49/−105 lines, 6 filesdep −errors
Dependencies removed: errors
Files
- CHANGELOG.md +4/−0
- README.md +1/−1
- package.yaml +0/−51
- src/Data/Text/Conversions.hs +4/−2
- stack.yaml +0/−7
- text-conversions.cabal +40/−44
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog +## 0.3.1.1 (May 2nd, 2022)++- Eliminated dependency on the `errors` package.+ ## 0.3.1 (September 29th, 2020) - Added support for `base16-bytestring-1.0`.
README.md view
@@ -1,4 +1,4 @@-# text-conversions [](https://travis-ci.org/cjdev/text-conversions)+# text-conversions [](https://github.com/cjdev/text-conversions/actions/workflows/build.yml) [][hackage] This is a small library to ease the pain when converting between the many different string types in Haskell. Unlike some other libraries that attempt to solve the same problem, text-conversions is:
− package.yaml
@@ -1,51 +0,0 @@-name: text-conversions-version: 0.3.1-category: Data-synopsis: Safe conversions between textual types-description: Safe conversions between textual types-license: ISC-author: Alexis King-maintainer: lexi.lambda@gmail.com--github: cjdev/text-conversions--extra-source-files:-- README.md-- CHANGELOG.md-- LICENSE-- package.yaml-- stack.yaml--ghc-options: -Wall-default-extensions:-- FlexibleInstances-- MultiParamTypeClasses-- OverloadedStrings--library:- source-dirs: src- dependencies:- - base >=4.7 && <5- - bytestring <1- - base16-bytestring <2- - base64-bytestring <2- - errors <3- - text <2--tests:- text-conversions-test-suite:- source-dirs: test- main: Main.hs- ghc-options:- - -rtsopts- - -threaded- - -with-rtsopts=-N- dependencies:- - base- - text-conversions- - bytestring- - hspec- - text- verbatim: |- build-tool-depends:- hspec-discover:hspec-discover
src/Data/Text/Conversions.hs view
@@ -48,8 +48,6 @@ , Base64(..) ) where -import Control.Error.Util (hush)- import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Data.Text.Lazy as TL@@ -143,6 +141,10 @@ -} decodeConvertText :: (DecodeText f a, FromText b) => a -> f b decodeConvertText = fmap fromText . decodeText++hush :: Either a b -> Maybe b+hush (Left _) = Nothing+hush (Right x) = Just x instance ToText T.Text where toText = id instance FromText T.Text where fromText = id
− stack.yaml
@@ -1,7 +0,0 @@-resolver: lts-16.16--packages: ['.']-extra-deps: []--flags: {}-extra-package-dbs: []
text-conversions.cabal view
@@ -1,68 +1,64 @@-cabal-version: 1.12---- This file has been generated from package.yaml by hpack version 0.33.0.------ see: https://github.com/sol/hpack------ hash: 7c0bf9ebe6887baff27c40e9fdb7bb6569b32eac6b9e701e2ab9355feb75353d+cabal-version: 2.4+name: text-conversions+version: 0.3.1.1+category: Data+build-type: Simple+synopsis: Safe conversions between textual types+description: Safe conversions between textual types -name: text-conversions-version: 0.3.1-synopsis: Safe conversions between textual types-description: Safe conversions between textual types-category: Data-homepage: https://github.com/cjdev/text-conversions#readme-bug-reports: https://github.com/cjdev/text-conversions/issues-author: Alexis King-maintainer: lexi.lambda@gmail.com-license: ISC-license-file: LICENSE-build-type: Simple+author: Alexis King+maintainer: Alexis King <lexi.lambda@gmail.com>+license: ISC+license-file: LICENSE extra-source-files:- README.md- CHANGELOG.md- LICENSE- package.yaml- stack.yaml+ README.md+ CHANGELOG.md+ LICENSE +homepage: https://github.com/cjdev/text-conversions+bug-reports: https://github.com/cjdev/text-conversions/issues+ source-repository head type: git location: https://github.com/cjdev/text-conversions -library- exposed-modules:- Data.Text.Conversions- other-modules:- Paths_text_conversions- hs-source-dirs:- src+common common+ default-language: Haskell2010 default-extensions: FlexibleInstances MultiParamTypeClasses OverloadedStrings ghc-options: -Wall+ if impl(ghc >= 8.0.1)+ ghc-options: -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints++library+ import: common++ hs-source-dirs: src+ exposed-modules:+ Data.Text.Conversions+ build-depends:- base >=4.7 && <5+ , base >=4.7 && <5 , base16-bytestring <2 , base64-bytestring <2 , bytestring <1- , errors <3- , text <2- default-language: Haskell2010+ , text <3 test-suite text-conversions-test-suite+ import: common type: exitcode-stdio-1.0++ hs-source-dirs: test main-is: Main.hs other-modules:- Data.Text.ConversionsSpec- Paths_text_conversions- hs-source-dirs:- test- default-extensions: FlexibleInstances MultiParamTypeClasses OverloadedStrings- ghc-options: -Wall -rtsopts -threaded -with-rtsopts=-N+ Data.Text.ConversionsSpec++ ghc-options: -rtsopts -threaded -with-rtsopts=-N+ build-depends:- base+ , base , bytestring , hspec , text , text-conversions- default-language: Haskell2010 build-tool-depends:- hspec-discover:hspec-discover+ hspec-discover:hspec-discover