relude 1.1.0.0 → 1.2.0.0
raw patch · 60 files changed
+149/−108 lines, 60 filesdep ~basedep ~bytestringdep ~deepseq
Dependency ranges changed: base, bytestring, deepseq, doctest, ghc-prim, hedgehog, mtl
Files
- CHANGELOG.md +15/−0
- README.md +1/−1
- relude.cabal +18/−14
- src/Relude.hs +1/−1
- src/Relude/Applicative.hs +1/−1
- src/Relude/Base.hs +11/−3
- src/Relude/Bool.hs +1/−1
- src/Relude/Bool/Guard.hs +1/−1
- src/Relude/Bool/Reexport.hs +1/−1
- src/Relude/Container.hs +1/−1
- src/Relude/Container/One.hs +1/−1
- src/Relude/Container/Reexport.hs +1/−1
- src/Relude/Debug.hs +6/−10
- src/Relude/DeepSeq.hs +1/−1
- src/Relude/Enum.hs +1/−1
- src/Relude/Exception.hs +2/−10
- src/Relude/Extra.hs +1/−1
- src/Relude/Extra/Bifunctor.hs +1/−1
- src/Relude/Extra/CallStack.hs +1/−1
- src/Relude/Extra/Enum.hs +1/−1
- src/Relude/Extra/Foldable.hs +1/−1
- src/Relude/Extra/Foldable1.hs +1/−1
- src/Relude/Extra/Group.hs +4/−3
- src/Relude/Extra/Lens.hs +1/−1
- src/Relude/Extra/Map.hs +25/−3
- src/Relude/Extra/Newtype.hs +1/−6
- src/Relude/Extra/Tuple.hs +1/−1
- src/Relude/Extra/Type.hs +2/−2
- src/Relude/File.hs +1/−1
- src/Relude/Foldable.hs +1/−1
- src/Relude/Foldable/Fold.hs +1/−1
- src/Relude/Foldable/Reexport.hs +2/−2
- src/Relude/Function.hs +1/−1
- src/Relude/Functor.hs +1/−1
- src/Relude/Functor/Fmap.hs +1/−1
- src/Relude/Functor/Reexport.hs +1/−1
- src/Relude/Lifted.hs +1/−1
- src/Relude/Lifted/Concurrent.hs +1/−1
- src/Relude/Lifted/Env.hs +1/−1
- src/Relude/Lifted/Exit.hs +1/−1
- src/Relude/Lifted/File.hs +1/−1
- src/Relude/Lifted/Handle.hs +1/−1
- src/Relude/Lifted/IORef.hs +1/−1
- src/Relude/Lifted/Terminal.hs +1/−1
- src/Relude/List.hs +1/−1
- src/Relude/List/NonEmpty.hs +5/−1
- src/Relude/List/Reexport.hs +1/−1
- src/Relude/Monad.hs +2/−2
- src/Relude/Monad/Either.hs +1/−1
- src/Relude/Monad/Maybe.hs +3/−3
- src/Relude/Monad/Reexport.hs +1/−1
- src/Relude/Monad/Trans.hs +1/−1
- src/Relude/Monoid.hs +2/−2
- src/Relude/Nub.hs +2/−2
- src/Relude/Numeric.hs +1/−1
- src/Relude/Print.hs +1/−1
- src/Relude/String.hs +1/−1
- src/Relude/String/Conversion.hs +1/−1
- src/Relude/String/Reexport.hs +5/−1
- src/Relude/Unsafe.hs +1/−1
CHANGELOG.md view
@@ -3,6 +3,21 @@ `relude` uses [PVP Versioning][1]. The changelog is available [on GitHub][2]. +## 1.2.0.0 – Mar 1, 2023++* [#420](https://github.com/kowainik/relude/issues/420):+ Support GHC-9.4.+* Reexport `type (~)` from `Data.Type.Equality` for GHC-9.4.+* Add `-Wredundant-strictness-flags` and `-Wforall-identifier` warnings for+ GHC-9.4.+* [#430](https://github.com/kowainik/relude/issues/430):+ Upgrade dependencies:+ - `ghc-prim-0.9`+ - `mtl-2.3`+ - `hedgehog-1.2`+ - `doctest-0.21`+* Drop support of GHC-8.2.+ ## 1.1.0.0 — Jun 9, 2022 * [#388](https://github.com/kowainik/relude/issues/388):
README.md view
@@ -723,7 +723,7 @@ _O(n)_ time and you can accidentally use `elem` from `Foldable` but with `relude` you can't). 4. Protolude supports older GHC versions (from GHC 7.6.1) while `relude` only- supports from GHC 8.2.2. So if you aim ancient GHC versions, `protolude`+ supports from GHC 8.4. So if you aim ancient GHC versions, `protolude` might be a better choice. But because of that it contains a lot of CPP, code is scary in some places as a consequence and it is more difficult to add, remove or change things there.
relude.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: relude-version: 1.1.0.0+version: 1.2.0.0 synopsis: Safe, performant, user-friendly and lightweight Haskell Standard Library description: @__relude__@ is an alternative prelude library. If you find the default@@ -85,19 +85,19 @@ license-file: LICENSE author: Dmitrii Kovanikov, Veronika Romashkina, Stephen Diehl, Serokell maintainer: Kowainik <xrom.xkov@gmail.com>-copyright: 2016 Stephen Diehl, 2016-2018 Serokell, 2018-2021 Kowainik+copyright: 2016 Stephen Diehl, 2016-2018 Serokell, 2018-2023 Kowainik category: Prelude stability: stable build-type: Simple extra-doc-files: CHANGELOG.md README.md-tested-with: GHC == 8.2.2- GHC == 8.4.4+tested-with: GHC == 8.4.4 GHC == 8.6.5 GHC == 8.8.4 GHC == 8.10.7 GHC == 9.0.2- GHC == 9.2.2+ GHC == 9.2.7+ GHC == 9.4.4 source-repository head@@ -105,8 +105,6 @@ location: git@github.com:kowainik/relude.git common common-options- build-depends: base >= 4.10 && < 4.17- ghc-options: -Wall -Wcompat -Widentities@@ -127,6 +125,9 @@ if impl(ghc >= 9.2) ghc-options: -Wredundant-bang-patterns -Woperator-whitespace+ if impl(ghc >= 9.4)+ ghc-options: -Wredundant-strictness-flags+ -Wforall-identifier default-language: Haskell2010@@ -227,12 +228,13 @@ , Data.ByteString.Short - build-depends: bytestring >= 0.10 && < 0.12+ build-depends: base >= 4.11 && < 4.18+ , bytestring >= 0.10 && < 0.12 , containers >= 0.5.10 && < 0.7 , deepseq ^>= 1.4- , ghc-prim >= 0.4.0.0 && < 0.9+ , ghc-prim >= 0.5.0.0 && < 0.10 , hashable >= 1.2 && < 1.5- , mtl ^>= 2.2+ , mtl >= 2.2 && < 2.4 , stm >= 2.4 && < 2.6 , text >= 1.2 && < 2.1 , transformers >= 0.5 && < 0.7@@ -248,11 +250,12 @@ other-modules: Test.Relude.Gen Test.Relude.Container.One Test.Relude.Property- build-depends: relude+ build-depends: base+ , relude , bytestring , containers , text- , hedgehog >= 1.0 && < 1.2+ , hedgehog >= 1.0 && < 1.3 ghc-options: -threaded @@ -263,7 +266,7 @@ main-is: Doctest.hs build-depends: relude- , doctest ^>= 0.20+ , doctest >= 0.20 && < 0.22 , Glob ghc-options: -threaded@@ -274,7 +277,8 @@ hs-source-dirs: benchmark main-is: Main.hs - build-depends: relude+ build-depends: base+ , relude , tasty-bench , unordered-containers
src/Relude.hs view
@@ -4,7 +4,7 @@ Module : Relude Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Applicative.hs view
@@ -4,7 +4,7 @@ Module : Relude.Applicative Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Base.hs view
@@ -1,10 +1,12 @@-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE ExplicitNamespaces #-}+{-# LANGUAGE Trustworthy #-} {- | Module : Relude.Base Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable@@ -29,6 +31,9 @@ , module Data.Coerce , module Data.Kind , module Data.Proxy+#if __GLASGOW_HASKELL__ >= 904+ , module Data.Type.Equality+#endif , module Data.Typeable , module Data.Void @@ -51,13 +56,16 @@ import System.IO (FilePath, IO, IOMode (..)) -- Base typeclasses-import Data.Eq (Eq, (==), (/=))+import Data.Eq (Eq, (/=), (==)) import Data.Ord (Down (..), Ord (..), Ordering (..), comparing) -- Types for type-level computation import Data.Coerce (Coercible, coerce) import Data.Kind (Constraint, Type) import Data.Proxy (Proxy (..))+#if __GLASGOW_HASKELL__ >= 904+import Data.Type.Equality (type (~))+#endif import Data.Typeable (Typeable) import Data.Void (Void, absurd, vacuous)
src/Relude/Bool.hs view
@@ -4,7 +4,7 @@ Module : Relude.Bool Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Bool/Guard.hs view
@@ -4,7 +4,7 @@ Module : Relude.Bool.Guard Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Bool/Reexport.hs view
@@ -4,7 +4,7 @@ Module : Relude.Bool.Reexport Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Container.hs view
@@ -4,7 +4,7 @@ Module : Relude.Container Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Container/One.hs view
@@ -7,7 +7,7 @@ Module : Relude.Container.One Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Container/Reexport.hs view
@@ -4,7 +4,7 @@ Module : Relude.Container.Reexport Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Debug.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-}@@ -12,15 +13,11 @@ {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} -#if __GLASGOW_HASKELL__ > 802-{-# LANGUAGE DerivingStrategies #-}-#endif- {- | Module : Relude.Debug Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable@@ -89,6 +86,9 @@ ) where import Data.Data (Data)+#if __GLASGOW_HASKELL__ >= 904+import Data.Type.Equality (type (~))+#endif import GHC.Exts (RuntimeRep, TYPE) import GHC.TypeLits (ErrorMessage (..), TypeError) @@ -255,7 +255,7 @@ >>> error "oops" *** Exception: oops CallStack (from HasCallStack):- error, called at src\\Relude\\Debug.hs:289:11 in ...+ error, called at src\Relude\Debug.hs:289:11 in ... ... #else >>> error "oops"@@ -309,11 +309,7 @@ -- | Similar to 'undefined' but data type. data Undefined = Undefined-#if __GLASGOW_HASKELL__ > 802 deriving stock (Eq, Ord, Show, Read, Enum, Bounded, Data, Typeable, Generic)-#else- deriving (Eq, Ord, Show, Read, Enum, Bounded, Data, Typeable, Generic)-#endif {-# WARNING Undefined "'Undefined' type remains in code" #-} -- | 'Prelude.undefined' that leaves warning in code on every usage.
src/Relude/DeepSeq.hs view
@@ -4,7 +4,7 @@ Module : Relude.DeepSeq Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Enum.hs view
@@ -2,7 +2,7 @@ {- | Module : Relude.Enum-Copyright : (c) 2021-2022 Kowainik+Copyright : (c) 2021-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Exception.hs view
@@ -1,18 +1,14 @@-{-# LANGUAGE CPP #-}+{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE Safe #-} {-# LANGUAGE ViewPatterns #-} -#if __GLASGOW_HASKELL__ > 802-{-# LANGUAGE DerivingStrategies #-}-#endif- {- | Module : Relude.Exception Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable@@ -48,11 +44,7 @@ not meant to be ever executed, but happens to be executed anyway. -} data Bug = Bug SomeException CallStack-#if __GLASGOW_HASKELL__ > 802 deriving stock (Show)-#else- deriving (Show)-#endif instance Exception Bug where displayException (Bug e cStack) =
src/Relude/Extra.hs view
@@ -1,6 +1,6 @@ {- | Module : Relude.Extra-Copyright : (c) 2019-2022 Kowainik+Copyright : (c) 2019-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Extra/Bifunctor.hs view
@@ -2,7 +2,7 @@ {- | Module : Relude.Extra.Bifunctor-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Extra/CallStack.hs view
@@ -2,7 +2,7 @@ {- | Module : Relude.Extra.CallStack-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Extra/Enum.hs view
@@ -2,7 +2,7 @@ {- | Module : Relude.Extra.Enum-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Extra/Foldable.hs view
@@ -3,7 +3,7 @@ {- | Module : Relude.Extra.Foldable-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Extra/Foldable1.hs view
@@ -10,7 +10,7 @@ {- | Module : Relude.Extra.Foldable1 Copyright : (c) 2011-2015 Edward Kmett- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Extra/Group.hs view
@@ -1,9 +1,10 @@-{-# LANGUAGE Safe #-}-{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE Safe #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-} {- | Module : Relude.Extra.Group-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Extra/Lens.hs view
@@ -4,7 +4,7 @@ {- | Module : Relude.Extra.Lens Copyright : (c) 2012-2016 Edward Kmett- (c) 2019-2022 Kowainik+ (c) 2019-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Extra/Map.hs view
@@ -1,9 +1,11 @@-{-# LANGUAGE Trustworthy #-}-{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-} {- | Module : Relude.Extra.Map-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable@@ -26,9 +28,17 @@ , elems ) where +#if __GLASGOW_HASKELL__ >= 904+import Data.Type.Equality (type (~))+#endif import GHC.Exts (IsList (Item, toList)) +#if MIN_VERSION_hashable(1,4,0)+import Relude.Base (Ord, Type)+#else import Relude.Base (Eq, Ord, Type)+#endif+ import Relude.Bool (Bool, guard, not) import Relude.Container.Reexport (HashMap, HashSet, Hashable, IntMap, IntSet, Map, Set, fst, snd) import Relude.Function ((.))@@ -80,7 +90,11 @@ @since 0.1.0 -}+#if MIN_VERSION_hashable(1,4,0)+instance (Hashable k) => StaticMap (HashMap k v) where+#else instance (Eq k, Hashable k) => StaticMap (HashMap k v) where+#endif type Key (HashMap k v) = k type Val (HashMap k v) = v @@ -125,7 +139,11 @@ @since 0.1.0 -}+#if MIN_VERSION_hashable(1,4,0)+instance (Hashable a) => StaticMap (HashSet a) where+#else instance (Eq a, Hashable a) => StaticMap (HashSet a) where+#endif type Key (HashSet a) = a type Val (HashSet a) = a @@ -237,7 +255,11 @@ @since 0.1.0 -}+#if MIN_VERSION_hashable(1,4,0)+instance (Hashable k) => DynamicMap (HashMap k v) where+#else instance (Eq k, Hashable k) => DynamicMap (HashMap k v) where+#endif insert = HM.insert {-# INLINE insert #-} insertWith = HM.insertWith
src/Relude/Extra/Newtype.hs view
@@ -1,9 +1,8 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE Safe #-} {- | Module : Relude.Extra.Newtype-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable@@ -19,9 +18,7 @@ , wrap , under , under2-#if ( __GLASGOW_HASKELL__ != 802 ) , underF2-#endif , (#.) ) where @@ -89,7 +86,6 @@ under2 = coerce {-# INLINE under2 #-} -#if ( __GLASGOW_HASKELL__ != 802 ) {- | Version of 'under2' that works on @newtype@s parametrized by their representation. Provided for convenience. @@ -103,7 +99,6 @@ underF2 :: forall n a . Coercible a (n a) => (n a -> n a -> n a) -> (a -> a -> a) underF2 = coerce {-# INLINE underF2 #-}-#endif {- | Coercible composition. This function allows to write more efficient implementations of function compositions over @newtypes@.
src/Relude/Extra/Tuple.hs view
@@ -3,7 +3,7 @@ {- | Module : Relude.Extra.Tuple-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Extra/Type.hs view
@@ -10,7 +10,7 @@ {- | Module : Relude.Extra.Type-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable@@ -36,7 +36,7 @@ -- $setup--- >>> :set -XAllowAmbiguousTypes -XDataKinds -XExplicitNamespaces -XPolyKinds -XTypeFamilies -XTypeOperators -XUndecidableInstances +-- >>> :set -XAllowAmbiguousTypes -XDataKinds -XExplicitNamespaces -XPolyKinds -XTypeFamilies -XTypeOperators -XUndecidableInstances {- | Gets a string representation of a type.
src/Relude/File.hs view
@@ -2,7 +2,7 @@ {- | Module : Relude.File-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Foldable.hs view
@@ -2,7 +2,7 @@ {- | Module : Relude.Foldable-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Foldable/Fold.hs view
@@ -11,7 +11,7 @@ Module : Relude.Foldable.Fold Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Foldable/Reexport.hs view
@@ -3,7 +3,7 @@ {- | Module : Relude.Foldable.Reexport-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable@@ -27,8 +27,8 @@ #if MIN_VERSION_base(4,13,0) import Data.Foldable (foldMap') #endif-import Data.Traversable (Traversable (..), forM, mapAccumL, mapAccumR) import Data.Bifoldable (Bifoldable (..), biList, biall, biand, biany, biasum, bielem, bifind, bifoldl', bifoldlM, bifoldr', bifoldrM, bifor_, bilength, binull, bior, bisequence_, bitraverse_) import Data.Bitraversable (Bitraversable (..), bifoldMapDefault, bifor, bimapDefault, bisequence)+import Data.Traversable (Traversable (..), forM, mapAccumL, mapAccumR)
src/Relude/Function.hs view
@@ -4,7 +4,7 @@ Module : Relude.Function Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Functor.hs view
@@ -4,7 +4,7 @@ Module : Relude.Functor Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Functor/Fmap.hs view
@@ -5,7 +5,7 @@ Module : Relude.Functor.Fmap Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Functor/Reexport.hs view
@@ -5,7 +5,7 @@ Module : Relude.Functor.Reexport Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Lifted.hs view
@@ -4,7 +4,7 @@ Module : Relude.Lifted Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Lifted/Concurrent.hs view
@@ -4,7 +4,7 @@ Module : Relude.Lifted.Concurrent Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Lifted/Env.hs view
@@ -2,7 +2,7 @@ {- | Module : Relude.Lifted.Env-Copyright : (c) 2020-2022 Kowainik+Copyright : (c) 2020-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Lifted/Exit.hs view
@@ -4,7 +4,7 @@ Module : Relude.Lifted.Exit Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Lifted/File.hs view
@@ -5,7 +5,7 @@ Module : Relude.Lifted.File Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Lifted/Handle.hs view
@@ -2,7 +2,7 @@ {- | Module : Relude.Lifted.Handle-Copyright : (c) 2020-2022 Kowainik+Copyright : (c) 2020-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Lifted/IORef.hs view
@@ -4,7 +4,7 @@ Module : Relude.Lifted.IORef Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Lifted/Terminal.hs view
@@ -2,7 +2,7 @@ {- | Module : Relude.Lifted.Terminal-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/List.hs view
@@ -4,7 +4,7 @@ Module : Relude.List Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/List/NonEmpty.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE Safe #-}@@ -9,7 +10,7 @@ Module : Relude.List.NonEmpty Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable@@ -88,6 +89,9 @@ ) where import Data.List.NonEmpty (NonEmpty (..), nonEmpty)+#if __GLASGOW_HASKELL__ >= 904+import Data.Type.Equality (type (~))+#endif import GHC.TypeLits (ErrorMessage (..), Symbol, TypeError) import Relude.Applicative (Applicative, pass)
src/Relude/List/Reexport.hs view
@@ -4,7 +4,7 @@ Module : Relude.List.Reexport Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Monad.hs view
@@ -4,7 +4,7 @@ Module : Relude.Monad Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable@@ -53,7 +53,7 @@ {- | Repeat a monadic action indefinitely. -This is a more type safe version of 'forever', which has a convinient+This is a more type safe version of 'forever', which has a convenient but unsafe type. Consider the following two examples. In the @getIntForever@ functions, it
src/Relude/Monad/Either.hs view
@@ -6,7 +6,7 @@ Module : Relude.Monad.Either Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Monad/Maybe.hs view
@@ -4,7 +4,7 @@ Module : Relude.Monad.Maybe Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable@@ -98,7 +98,7 @@ whenNothing_ _ _ = pass {-# INLINE whenNothing_ #-} -{- | Monadic version of 'whenNothingM'.+{- | Monadic version of 'whenNothing'. >>> whenNothingM (pure $ Just True) $ True <$ putTextLn "Is Just!" True@@ -110,7 +110,7 @@ whenNothingM mm action = mm >>= \m -> whenNothing m action {-# INLINE whenNothingM #-} -{- | Monadic version of 'whenNothingM_'.+{- | Monadic version of 'whenNothing_'. >>> whenNothingM_ (pure $ Just True) $ putTextLn "Is Just!" >>> whenNothingM_ (pure Nothing) $ putTextLn "Is Nothing!"
src/Relude/Monad/Reexport.hs view
@@ -4,7 +4,7 @@ Module : Relude.Monad.Reexport Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Monad/Trans.hs view
@@ -4,7 +4,7 @@ Module : Relude.Monad.Trans Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Monoid.hs view
@@ -5,13 +5,12 @@ {-# LANGUAGE Trustworthy #-} #else {-# LANGUAGE Safe #-}-#endif {- | Module : Relude.Monoid Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable@@ -20,6 +19,7 @@ Reexports functions to work with monoids plus adds extra useful functions. -} +#endif module Relude.Monoid ( -- * Reexports module Data.Monoid
src/Relude/Nub.hs view
@@ -5,7 +5,7 @@ Module : Relude.Nub Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable@@ -55,8 +55,8 @@ #if !MIN_VERSION_hashable(1,4,0) import Data.Eq (Eq) #endif-import Data.HashSet as HashSet import Data.Hashable (Hashable)+import Data.HashSet as HashSet import Data.Ord (Ord) import Prelude (Int, (.))
src/Relude/Numeric.hs view
@@ -2,7 +2,7 @@ {- | Module : Relude.Numeric-Copyright : (c) 2018-2022 Kowainik+Copyright : (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/Print.hs view
@@ -7,7 +7,7 @@ Module : Relude.Print Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/String.hs view
@@ -4,7 +4,7 @@ Module : Relude.String Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/String/Conversion.hs view
@@ -13,7 +13,7 @@ Module : Relude.String.Conversion Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable
src/Relude/String/Reexport.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-}@@ -10,7 +11,7 @@ Module : Relude.String.Reexport Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable@@ -50,6 +51,9 @@ import Data.Text.Encoding (decodeUtf8', decodeUtf8With) import Data.Text.Encoding.Error (OnDecodeError, OnError, UnicodeException, lenientDecode, strictDecode)+#if __GLASGOW_HASKELL__ >= 904+import Data.Type.Equality (type (~))+#endif import GHC.TypeLits (ErrorMessage (..), Symbol, TypeError) import Text.Read (Read, readMaybe, reads)
src/Relude/Unsafe.hs view
@@ -4,7 +4,7 @@ Module : Relude.Unsafe Copyright : (c) 2016 Stephen Diehl (c) 2016-2018 Serokell- (c) 2018-2022 Kowainik+ (c) 2018-2023 Kowainik SPDX-License-Identifier : MIT Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable