packages feed

relude-0.4.0: relude.cabal

cabal-version:       2.0
name:                relude
version:             0.4.0
synopsis:            Custom prelude from Kowainik
description:
    == Goals
    .
    * __Avoid all [partial functions](https://www.reddit.com/r/haskell/comments/5n51u3/why_are_partial_functions_as_in_head_tail_bad/)__
      (like @head :: [a] -> a@). The types of partial functions lie about their
      behavior and usage of such functions can lead to the unexpected bugs. Though
      you can still use some unsafe functions from @Relude.Unsafe@ module, but they
      are not exported by default.
    .
    * __Type-safety__. We like to make invalid states unrepresantable. And if it's
      possible to express this concept through the types then we will do it.
      /Example:/ @ whenNotNull :: Applicative f => [a] -> (NonEmpty a -> f ()) -> f () @
    .
    * __Performance.__ Prefer @Text@ over @[String](https://www.reddit.com/r/haskell/comments/29jw0s/whats_wrong_with_string/)@,
      use spaceleak-free functions (like our custom @sum@ and @product@).
    .
    * __Minimalism__ (low number of dependencies). We don't force users of @relude@ to
      stick to some specific lens or text formatting or logging library.
    .
    * __Convenience__ (like lifted to @MonadIO@ functions, more reexports). But we
      want to bring common types and functions (like @containers@ and @bytestrng@)
      into scope because they are used in almost every application anyways.
    .
    * __Provide excellent documentation.__
      .
      1. Tutorial
      .
      2. Migration guide from @Prelude@
      .
      3. Haddock with examples for (almost) every function
        (all examples are tested with [`doctest`](http://hackage.haskell.org/package/doctest))
      .
      4. Documentation regarding [internal module structure]((http://hackage.haskell.org/package/relude/docs/Relude.html))
      .
      5. @relude@-specific [HLint](http://hackage.haskell.org/package/hlint) rules: @[.hlint.yaml](https://github.com/kowainik/relude/blob/master/.hlint.yaml)@
    .
    * __User-friendliness.__ Ability to quickly migrate to @relude@ if you're familiar
      with the common libraries like @text@ and @containers@.
    .
    * __Exploration.__ Experiment with new ideas and proposals without introducing
      breaking changes.

homepage:            https://github.com/kowainik/relude
bug-reports:         https://github.com/kowainik/relude/issues
license:             MIT
license-file:        LICENSE
author:              Stephen Diehl, @serokell, Kowainik
maintainer:          Kowainik <xrom.xkov@gmail.com>
copyright:           2016 Stephen Diehl, 2016-2018 Serokell, 2018 Kowainik
category:            Prelude
stability:           stable
build-type:          Simple
tested-with:         GHC == 8.0.2
                   , GHC == 8.2.2
                   , GHC == 8.4.3
                   , GHC == 8.6.1
extra-doc-files:     CHANGELOG.md
                   , CONTRIBUTING.md
                   , README.md

source-repository head
  type:     git
  location: git@github.com:kowainik/relude.git

library
  hs-source-dirs:      src
  exposed-modules:
                       Relude
                           Relude.Applicative
                           Relude.Base
                           Relude.Bool
                               Relude.Bool.Guard
                               Relude.Bool.Reexport
                           Relude.Container
                               Relude.Container.One
                               Relude.Container.Reexport
                           Relude.Debug
                           Relude.DeepSeq
                           Relude.Exception
                           Relude.File
                           Relude.Foldable
                               Relude.Foldable.Fold
                               Relude.Foldable.Reexport
                           Relude.Function
                           Relude.Functor
                               Relude.Functor.Fmap
                               Relude.Functor.Reexport
                           Relude.Lifted
                               Relude.Lifted.Concurrent
                               Relude.Lifted.Exit
                               Relude.Lifted.File
                               Relude.Lifted.IORef
                               Relude.Lifted.Terminal
                           Relude.List
                               Relude.List.NonEmpty
                               Relude.List.Reexport
                           Relude.Monad
                               Relude.Monad.Either
                               Relude.Monad.Maybe
                               Relude.Monad.Reexport
                               Relude.Monad.Trans
                           Relude.Monoid
                           Relude.Nub
                           Relude.Print
                           Relude.String
                               Relude.String.Conversion
                               Relude.String.Reexport

                           -- not exported by default
                           Relude.Extra.Bifunctor                          
                           Relude.Extra.CallStack
                           Relude.Extra.Enum
                           Relude.Extra.Foldable1
                           Relude.Extra.Group
                           Relude.Extra.Map
                           Relude.Extra.Newtype
                           Relude.Extra.Tuple
                           Relude.Extra.Type
                           Relude.Extra.Validation
                           Relude.Unsafe

  ghc-options:         -Wall
                       -Wcompat
                       -Widentities
                       -Wincomplete-uni-patterns
                       -Wincomplete-record-updates
                       -fwarn-implicit-prelude

  build-depends:       base >= 4.9 && < 5
                     , bytestring ^>= 0.10
                     , containers >= 0.5.7 && < 0.7
                     , deepseq ^>= 1.4
                     , ghc-prim >= 0.4.0.0 && < 0.6
                     , hashable ^>= 1.2
                     , mtl ^>= 2.2
                     , stm >= 2.4 && < 2.6
                     , text ^>= 1.2
                     , transformers ^>= 0.5
                     , unordered-containers >= 0.2.7 && < 0.3

  default-language:    Haskell2010
  default-extensions:  NoImplicitPrelude
                       OverloadedStrings

test-suite relude-test
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs

  other-modules:       Test.Relude.Property

  build-depends:       base >= 4.9 && < 5
                     , relude
                     , bytestring
                     , text
                     , hedgehog >= 0.6
                     , tasty
                     , tasty-hedgehog

  ghc-options:         -Wall
                       -threaded
                       -Wincomplete-uni-patterns
                       -Wincomplete-record-updates
                       -Wcompat
                       -Widentities
                       -Wredundant-constraints

  default-language:    Haskell2010
  default-extensions:  NoImplicitPrelude
                       TypeApplications

test-suite relude-doctest
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Doctest.hs

  build-depends:       base >= 4.9 && < 5
                     , doctest
                     , Glob

  ghc-options:         -threaded
  default-language:    Haskell2010

benchmark relude-benchmark
  type:                exitcode-stdio-1.0
  hs-source-dirs:      benchmark
  main-is:             Main.hs

  build-depends:       base >= 4.9 && < 5
                     , relude
                     , containers
                     , gauge
                     , unordered-containers

  ghc-options:         -Wall
                       -threaded
                       -rtsopts
                       -with-rtsopts=-N
                       -Wincomplete-uni-patterns
                       -Wincomplete-record-updates
                       -Wcompat
                       -Widentities
                       -Wredundant-constraints

  default-language:    Haskell2010
  default-extensions:  NoImplicitPrelude
                       ScopedTypeVariables