packages feed

universum 1.1.1 → 1.2.0

raw patch · 7 files changed

+151/−152 lines, 7 filesdep −text-formatdep ~Globdep ~basedep ~bytestringsetup-changed

Dependencies removed: text-format

Dependency ranges changed: Glob, base, bytestring, containers, deepseq, doctest, gauge, hashable, hedgehog, microlens, microlens-mtl, mtl, safe-exceptions, stm, tasty, tasty-hedgehog, text, transformers, type-operators, unordered-containers, utf8-string, vector

Files

CHANGES.md view
@@ -1,3 +1,13 @@+1.2.0+=====++* [#159](https://github.com/serokell/universum/issues/159) **Breaking change**:+  Remove `text-format` dependency.+  +  _Migration guide:_ import `Buildable` type class either from `text-format` or `formatting` or `fmt` library. Instead of `pretty` you can use [`fmt`](https://hackage.haskell.org/package/fmt-0.6/docs/Fmt.html#v:fmt) function.+* [#164](https://github.com/serokell/universum/issues/164):+  Don't reexport `log :: Floating a => a -> a`.+ 1.1.1 ===== 
README.md view
@@ -54,7 +54,7 @@  This is why we decided to use a better tool. Luckily, _Haskell_ provides us with the ability to replace default `Prelude` with an alternative. All we had to do is to implement a-new basic set of defaults. There already were plenty of [preludes](https://guide.aelve.com/haskell/alternative-preludes-zr69k1hc), +new basic set of defaults. There already were plenty of [preludes](https://guide.aelve.com/haskell/alternative-preludes-zr69k1hc), so we didn't plan to implement everything from scratch. After some long, hot discussions, our team decided to base our custom prelude on [`protolude`](https://github.com/sdiehl/protolude). If you're not familiar with it,@@ -145,8 +145,6 @@   `OverloadedStrings` is enabled – it happens because the compiler doesn't know what   type to infer for the string. Use `putTextLn` in this case. * Since `show` doesn't come from `Show` anymore, you can't write `Show` instances easily.-  Either use autoderived instances or-  [`Buildable`](https://github.com/serokell/universum/blob/f2ccf8afd862e37ccd204c0ef9efde48a05c2d29/src/Universum.hs#L144). * You can't call some `Foldable` methods over `Maybe` and some other types.   `Foldable` generalization is useful but   [potentially error-prone](https://www.reddit.com/r/haskell/comments/60r9hu/proposal_suggest_explicit_type_application_for/).@@ -217,7 +215,6 @@ * `ordNub` and `sortNub` are _O(n log n)_ versions of `nub` (which is quadratic)   and `hashNub` and `unstableNub` are almost _O(n)_ versions of `nub`. * `(&)` – reverse application. `x & f & g` instead of `g $ f $ x` is useful sometimes.-* `pretty` and `prettyL` for converting `Buildable` into `Text` (suggested be used instead of `show`). * `whenM`, `unlessM`, `ifM`, `guardM` are available and do what you expect   them to do (e.g. `whenM (doesFileExist "foo")`). * Very generalized version of `concatMapM`, too, is available and does what expected.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
src/Universum/Base.hs view
@@ -81,7 +81,7 @@ import GHC.Base (String, asTypeOf, maxInt, minInt, ord, seq) import GHC.Enum (Bounded (..), Enum (..), boundedEnumFrom, boundedEnumFromThen) import GHC.Exts (Constraint, FunPtr, Ptr)-import GHC.Float (Double (..), Float (..), Floating (..))+import GHC.Float (Double (..), Float (..), Floating (acos, acosh, asin, asinh, atan, atanh, cos, cosh, exp, logBase, pi, sin, sinh, sqrt, tan, tanh, (**))) import GHC.Generics (Generic) import GHC.Num (Integer, Num (..), subtract) import GHC.Real hiding (showSigned, (%))
src/Universum/String/Conversion.hs view
@@ -24,19 +24,15 @@          -- * Show and read functions        , readEither        , show-       , pretty-       , prettyL        ) where  import Data.Bifunctor (first) import Data.Either (Either) import Data.Function (id, (.)) import Data.String (String)-import Data.Text.Buildable (build)-import Data.Text.Lazy.Builder (toLazyText)  import Universum.Functor ((<$>))-import Universum.String.Reexport (Buildable, ByteString, IsString, Read, Text, fromString, toStrict)+import Universum.String.Reexport (ByteString, IsString, Read, Text, fromString)  import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as LB@@ -180,11 +176,3 @@ {-# SPECIALIZE show :: Show.Show  a => a -> ByteString  #-} {-# SPECIALIZE show :: Show.Show  a => a -> LByteString  #-} {-# SPECIALIZE show :: Show.Show  a => a -> String  #-}---- | Functions to show pretty output for buildable data types.-pretty :: Buildable a => a -> Text-pretty = toStrict . prettyL---- | Similar to 'pretty' but for 'LText'.-prettyL :: Buildable a => a -> LText-prettyL = toLazyText . build
src/Universum/String/Reexport.hs view
@@ -13,15 +13,11 @@           -- * ByteString        , module Data.ByteString--         -- * Buildable-       , module Data.Text.Buildable        ) where  import Data.ByteString (ByteString) import Data.String (IsString (..)) import Data.Text (Text, lines, unlines, unwords, words)-import Data.Text.Buildable (Buildable) import Data.Text.Encoding (decodeUtf8', decodeUtf8With) import Data.Text.Encoding.Error (OnDecodeError, OnError, UnicodeException, lenientDecode,                                  strictDecode)
universum.cabal view
@@ -1,136 +1,142 @@-name: universum-version: 1.1.1-cabal-version: >=1.18-build-type: Simple-license: MIT-license-file: LICENSE-copyright: 2016 Stephen Diehl, 2016-2018 Serokell-maintainer: Serokell <hi@serokell.io>-stability: stable-homepage: https://github.com/serokell/universum-bug-reports: https://github.com/serokell/universum/issues-synopsis: Custom prelude used in Serokell-description:-    See README.md file for more details.-category: Prelude-author: Stephen Diehl, @serokell-tested-with: GHC ==7.10.3 GHC ==8.0.2 GHC ==8.2.2-extra-doc-files: CHANGES.md-                 CONTRIBUTING.md-                 README.md+name:                universum+version:             1.2.0+synopsis:            Custom prelude used in Serokell+description:         See README.md file for more details.+homepage:            https://github.com/serokell/universum+license:             MIT+license-file:        LICENSE+author:              Stephen Diehl, @serokell+maintainer:          Serokell <hi@serokell.io>+copyright:           2016 Stephen Diehl, 2016-2018 Serokell+category:            Prelude+stability:           stable+build-type:          Simple+cabal-version:       2.0+bug-reports:         https://github.com/serokell/universum/issues+tested-with:         GHC == 7.10.3+                   , GHC == 8.0.2+                   , GHC == 8.2.2+                   , GHC == 8.4.2+extra-doc-files:     CHANGES.md+                   , CONTRIBUTING.md+                   , README.md  source-repository head-    type: git-    location: git@github.com:serokell/universum.git+  type:     git+  location: git@github.com:serokell/universum.git  library-    exposed-modules:-        Universum-        Universum.Applicative-        Universum.Base-        Universum.Bool-        Universum.Bool.Guard-        Universum.Bool.Reexport-        Universum.Container-        Universum.Container.Class-        Universum.Container.Reexport-        Universum.Debug-        Universum.DeepSeq-        Universum.Exception-        Universum.Function-        Universum.Functor-        Universum.Functor.Fmap-        Universum.Functor.Reexport-        Universum.Lifted-        Universum.Lifted.Concurrent-        Universum.Lifted.Env-        Universum.Lifted.File-        Universum.Lifted.IORef-        Universum.Lifted.ST-        Universum.List-        Universum.List.Reexport-        Universum.List.Safe-        Universum.Monad-        Universum.Monad.Container-        Universum.Monad.Either-        Universum.Monad.Maybe-        Universum.Monad.Reexport-        Universum.Monad.Trans-        Universum.Monoid-        Universum.Nub-        Universum.Print-        Universum.String-        Universum.String.Conversion-        Universum.String.Reexport-        Universum.TypeOps-        Universum.Unsafe-        Universum.VarArg-    build-depends:-        base >=4.8 && <5,-        bytestring >=0.10.8.1,-        containers >=0.5.7.1,-        deepseq >=1.4.2.0,-        ghc-prim >=0.4.0.0,-        hashable >=1.2.6.1,-        microlens >=0.4.8.1,-        microlens-mtl >=0.1.11.0,-        mtl >=2.2.1,-        safe-exceptions >=0.1.6.0,-        stm >=2.4.4.1,-        text >=1.2.2.2,-        text-format >=0.3.1.1,-        transformers >=0.5.2.0,-        type-operators >=0.1.0.4,-        unordered-containers >=0.2.8.0,-        utf8-string >=1.0.1.1,-        vector >=0.12.0.1-    default-language: Haskell2010-    default-extensions: NoImplicitPrelude OverloadedStrings-    hs-source-dirs: src-    ghc-options: -Wall -fwarn-implicit-prelude+  hs-source-dirs:      src+  exposed-modules:+                       Universum+                           Universum.Applicative+                           Universum.Base+                           Universum.Bool+                               Universum.Bool.Guard+                               Universum.Bool.Reexport+                           Universum.Container+                               Universum.Container.Class+                               Universum.Container.Reexport+                           Universum.Debug+                           Universum.DeepSeq+                           Universum.Exception+                           Universum.Function+                           Universum.Functor+                               Universum.Functor.Fmap+                               Universum.Functor.Reexport+                           Universum.Lifted+                               Universum.Lifted.Concurrent+                               Universum.Lifted.Env+                               Universum.Lifted.File+                               Universum.Lifted.IORef+                               Universum.Lifted.ST+                           Universum.List+                               Universum.List.Reexport+                               Universum.List.Safe+                           Universum.Monad+                               Universum.Monad.Container+                               Universum.Monad.Either+                               Universum.Monad.Maybe+                               Universum.Monad.Reexport+                               Universum.Monad.Trans+                           Universum.Monoid+                           Universum.Nub+                           Universum.Print+                           Universum.String+                               Universum.String.Conversion+                               Universum.String.Reexport+                           Universum.TypeOps+                           Universum.Unsafe+                           Universum.VarArg -test-suite  universum-test-    type: exitcode-stdio-1.0-    main-is: Spec.hs-    build-depends:-        base >=4.8 && <5,-        universum -any,-        bytestring >=0.10.8.1,-        text >=1.2.2.2,-        utf8-string >=1.0.1.1,-        hedgehog >=0.5.1,-        tasty >=0.11.3,-        tasty-hedgehog >=0.1.0.2-    default-language: Haskell2010-    hs-source-dirs: test-    other-modules:-        Test.Universum.Property-    ghc-options: -Wall -threaded-test-suite  universum-doctest-    type: exitcode-stdio-1.0-    main-is: Doctest.hs-    build-depends:-        base >=4.8 && <5,-        doctest >=0.11.4,-        Glob >=0.8.0-    default-language: Haskell2010-    hs-source-dirs: test-    ghc-options: -threaded+  ghc-options:         -Wall -fwarn-implicit-prelude -benchmark  universum-benchmark-    -    if impl(ghc ==7.10.3)-        build-depends:-            semigroups >=0.18-    type: exitcode-stdio-1.0-    main-is: Main.hs-    build-depends:-        base >=4.9.1.0 && <5,-        universum -any,-        containers >=0.5.7.1,-        gauge >=0.1.3,-        unordered-containers >=0.2.8.0-    default-language: Haskell2010-    default-extensions: NoImplicitPrelude ScopedTypeVariables-    hs-source-dirs: benchmark-    ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N+  build-depends:       base >= 4.8 && < 5+                     , bytestring+                     , containers+                     , deepseq+                     , ghc-prim >= 0.4.0.0+                     , hashable+                     , microlens+                     , microlens-mtl+                     , mtl+                     , safe-exceptions+                     , stm+                     , text+                     , transformers+                     , type-operators+                     , unordered-containers+                     , utf8-string+                     , vector++  default-language:    Haskell2010+  default-extensions:  NoImplicitPrelude+                       OverloadedStrings++test-suite universum-test+  type:                exitcode-stdio-1.0+  hs-source-dirs:      test+  main-is:             Spec.hs++  other-modules:       Test.Universum.Property++  build-depends:       base             >= 4.8 && < 5+                     , universum+                     , bytestring+                     , text+                     , utf8-string+                     , hedgehog+                     , tasty+                     , tasty-hedgehog++  ghc-options:         -Wall -threaded+  default-language:    Haskell2010++test-suite universum-doctest+  type:                exitcode-stdio-1.0+  hs-source-dirs:      test+  main-is:             Doctest.hs++  build-depends:       base >= 4.8 && < 5+                     , doctest+                     , Glob++  ghc-options:         -threaded+  default-language:    Haskell2010++benchmark universum-benchmark+  type:                exitcode-stdio-1.0+  default-language:    Haskell2010+  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N+  hs-source-dirs:      benchmark+  main-is:             Main.hs+  build-depends:       base < 5+                     , universum+                     , containers+                     , gauge+                     , unordered-containers+  if impl(ghc == 7.10.3)+     build-depends:   semigroups >= 0.18++  default-extensions:  NoImplicitPrelude+                       ScopedTypeVariables