🌀 Safe, performant, user-friendly and lightweight Haskell standard library
infinitely
by @elldritch in https://github.com/kowainik/relude/pull/417
Full Changelog: https://github.com/kowainik/relude/compare/v1.1.0.0...v1.2.0.0
inverseMap
by @amesgen in https://github.com/kowainik/relude/pull/389
hashable
by @JackKelly-Bellroy in https://github.com/kowainik/relude/pull/399
readFileText
and writeFileText
by @chshersh in https://github.com/kowainik/relude/pull/407
Full Changelog: https://github.com/kowainik/relude/compare/v1.0.0.1...v1.1.0.0
#353: Reexport most common modules from the following libraries:
containers
unordered-containers
text
bytestring
Now, when using relude
, you don't need to add these libraries to
your .cabal
file to enjoy their main API. Try removing them from
your .cabal
file after upgrading to this version of relude
to
see if you still need them.
To utilise this feature, update the mixin
part of your package
configuration (if you're using the mixins approach) to the following:
mixins: base hiding (Prelude)
, relude (Relude as Prelude)
, relude
#345: Support GHC-9.0.
Upgrade minor GHC versions to GHC-8.10.4 and GHC-8.8.4.
#268: Drop support of GHC-8.0.2.
#270:
Standardise universe
, universeNonEmpty
and inverseMap
functions that
previously were introduced in the Relude.Extra.Enum
module. Relude.Enum
module created that is exported in the main Relude
module by default.
Migration guide: If you were using any of these functions you can now
remove Relude.Extra.Enum
from your imports and explicit mixins
section
as they are available for you with the Relude
module.
Remove the Eq
constraint on universeNonEmpty
#269:
Remove the Relude.Extra.Validation
module.
Migration guide:
If you use Relude.Extra.Validation
in you project you need to:
Add validation-selective
into the build-depends
section of your
.cabal
file.
Change imports of Relude.Extra.Validation
to Validation
:
-- Was:
import Relude.Extra.Validation (Validation (..), ..)
-- Became:
import Validation (Validation (..), ..)
#346,
#347:
Reimplement ordNub
through nubOrd
from containers
.
Add ordNubOn
, intNub
and intNubOn
functions.
#327:
Add infinitely
as more strictly typed forever
.
#311:
Add maybeAt
function — the non-operator version of !!?
with its
arguments flipped.
#314:
Add lifted versions of functions to work with Handle
:
hFlush
hIsEOF
hSetBuffering
hGetBuffering
#305: Add lifted versions of functions to work with environment:
getArgs
lookupEnv
Add lifted version of the readFile'
function.
Reexport the BufferMode
type from base
.
#309:
Reexport span
from Data.List
.
#319:
Implement partitionWith
.
#307:
Add foldr1
to Foldable1
.
#316:
Add average
and average1
— efficient functions for finding
average on foldable structures.
#306:
Add maximumOn1
and minimumOn1
to Foldable1
.
#301:
Add traceShowWith
to Relude.Debug
.
Updates to relude
-specific .hlint
rules.
Thanks @googleson78, @sushi-shi, @rektrex, @aleator, @mjgpy3, @dalpd, @Bodigrim for helping with this release!
NonEmpty
lists functions tables.@since
annotations.cabal
description.scanl1
, scanr1
, scanl'
from Data.List
.cycle
total function.etaReaderT
to Relude.Monad.Trans
to help with performance.atomicModifyIORef_
and atomicModifyIORef'_
.memptyIfFalse
and memptyIfTrue
functions.NonEmpty
functions from Relude.List.NonEmpty
instead of Relude.List.Reexport
.TMVar
from Relude.Lifted.Concurrent
.Relude.Extra
moduleuniverseNonEmpty
function.Relude.Extra.Lens
(^.)
operator.read
from Relude.Unsafe
for consistency.prec
, dupe
and mapBoth
.Relude.Extra.Validation
in favour of validation-selective
mapToFst
and mapToSnd
. Introduce toFst
and toSnd
in Relude.Extra.Tuple
as shorter aliases for mapToFst
. Implement fmapToFst
and fmapToSnd
. Add more HLint rules for Relude.Extra.Tuple
functions.readEither
is not polymorphic over the first argument anymore. Now it takes String
.One
property tests from doctest
to hedgehog
. Significant test time boost.See CHANGELOG for more details.
#171: Add custom type errors to various functions and instances.
head
, tail
, last
, init
words
, unwords
, lines
, unlines
error
ToText
, ToLText
, ToString
instances for bytestringsFoldable1
instance for ordinary listsMonad
instance for Validation
#164:
Reexport ShortByteString
, toShort
/fromShort
functions.
(by @vrom911)
#168, #197: Improve documentation significantly (more and better examples, better wording). (by @chshersh, @vrom911, @Cmdv)
#167: Rename functions (and deprecate old versions):
prec
to prev
dupe
to dup
#201:
Implement !!?
as a safe equivalent of !!
that returns a Maybe
.
(by @kutyel)
#203:
Implement the guarded
combinator.
(by @JonathanLorimer)
#174:
Implement bimapBoth
in Relude.Extra.Tuple
module,
mark mapBoth
as DEPRECATED.
(by @astynax)
#221:
Improve documentation for the Validation
module significantly.
(by @chshersh)
#176:
Implement property-based tests for Validation
laws.
(by @astynax)
#172:
Add Monoid
and Semigroup
instances for the Validation
type.
(by @mauriciofierrom)
#156:
Implement helper type-level functions in Relude.Extra.Type
.
(by @TheMatten)
#165:
Re-export GHC.Float.atan2
.
(by @ethercrow)
#155:
Implement foldlSC
— short-circuting list fold — in Relude.Extra.Foldable
.
(by @josephcsible)
#148: Migrate HLint rules to the latest Dhall spec. (by @vrom911)
#178:
Made die
be polymorphic in its return type.
(by @ilyakooo0)
#162, #189, #190, #191, #193, #194, #195: Various refactorings and code improvements:
asumMap
andM
, orM
, allM
, and anyM
in terms of &&^
and ||^
foldr
instead of explicit recursion and toList
mapToFst
instead of zip
to improve list fusion in inverseMap
foldMap1
for NonEmpty
in terms of foldr
$>
instead of *>
and pure
where possibleasumMap
and foldMapA
by coercing foldMap
<*
and *>
too(by @josephcsible)
#187:
Remove tasty
and tasty-hedgehog
dependencies and their redundant imports.
(by @dalpd)
Relude.Extra.Lens
module.Relude.Numeric
.
Reexport toIntegralSized
from Data.Bits
.
Add integerToBounded
and integerToNatural
in Relude.Numeric
.Ap
from Data.Monoid
. Change definition of foldMapA
to use Ap
.appliedTo
and chainedTo
as named versions of operators =<<
and <**>
.RealFloat
to Relude.Numeric
.traverseToSnd
and friends to Relude.Extra.Tuple
.elem
functions.Relude.Extra.*
modules with custom HLint rules.Relude.File
file: be more explicit about system
locale issues.One
typeclass and add tests.See the changelog
See CHANGELOG.md for details.
See CHANGELOG.md for more details.