universum
Custom prelude used in Serokell
https://github.com/serokell/universum
| LTS Haskell 23.28: | 1.8.2.2 | 
| Stackage Nightly 2025-10-31: | 1.8.3 | 
| Latest on Hackage: | 1.8.3 | 
universum-1.8.3@sha256:9e8d5017635f922e4b7c3ba240d6f2b4b91a31b6989a796659b57a30feb17191,6682Module documentation for 1.8.3
- Universum
- Universum.Applicative
- Universum.Base
- Universum.Bool
- Universum.Container
- Universum.Debug
- Universum.DeepSeq
- Universum.Exception
- Universum.Function
- Universum.Functor
- Universum.Lifted
- Universum.List
- Universum.Monad
- Universum.Monoid
- Universum.Nub
- Universum.Print
- Universum.String
- Universum.TypeOps
- Universum.Unsafe
- Universum.VarArg
 
Universum
universum is a custom prelude used in @Serokell that has:
- Excellent documentation: tutorial, migration guide from Prelude, Haddock with examples for (almost) every function, all examples are tested withdoctest, documentation regarding internal module structure.
- universum-specific HLint rules:- .hlint.yaml
- Focus on safety, convenience and efficiency.
What is this file about?
This README contains introduction to Universum and a tutorial on how to use it.
Structure of this tutorial
This tutorial has several parts:
- Philosophy and motivation.
- How to use universum.
- Changes in Prelude(some gotchas).
- Already known things that weren’t in Preludebrought into scope.
- New things added.
- Migration guide from Prelude.
This is neither a tutorial on Haskell nor tutorial on each function contained in Universum. For detailed documentation of every function together with examples and usage, see Haddock documentation.
Why another custom Prelude? ↑
Motivation
At Serokell, we strive to be as productive as possible. That’s why we are using Haskell. This choice of language implies
that we’re restricted to use Prelude:
implicit import of basic functions, type classes and data types. Unfortunately, the default Prelude
is considered to be not so good
due to some historical reasons.
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,
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.
The next section explains why we’ve made this choice and what we are willing to do.
This tutorial doesn’t cover the differences from protolude. Instead, it explains how Universum is different from regular Prelude.
Main goals
While creating and maintaining a custom prelude, we are pursuing the following goals:
- Avoid all partial functions.
We like total and exception-free functions.
You can still use some unsafe functions from Universum.Unsafemodule, but they are not exported by default.
- Use more efficient string representations.
Stringtype is crushingly inefficient. All our functions either try to be polymorphic over string type or useTextas the default string type. Because the community is evolving slowly, some libraries still useStringtype, soStringtype alias is still reexported. We recommend to avoidStringas much as you can!
- Try to not reinvent the wheel. We’re not trying to rebuild whole type hierarchy from scratch,
as it’s done in classy-prelude. Instead, we reexport common and well-known things frombaseand some other libraries that are used in everyday production programming in Haskell.Note: well, we did end up inventing some new things. 
- Export more useful and commonly used functions.
Things like liftIO,ReaderTtype,MVar-related functions have unambiguous names, are used in almost every non-trivial project, and it’s really tedious to import them manually every time.
- Make changes only when there are enough good reasons to make these changes. We have a code modification policy which semi-formally describes pre-conditions for different types of changes.
Unlike protolude, we are:
- Not trying to be as general as possible (thus we don’t export much from
GHC.Generics).
- Not trying to maintain every version of ghccompiler (but at least the latest 3).
- Trying to make writing production code easier (see enhancements and fixes).
How to use Universum ↑
Okay, enough philosophy. If you want to just start using universum and
explore it with the help of compiler, set everything up according to the instructions below.
Disable the built-in prelude at the top of your file:
{-# LANGUAGE NoImplicitPrelude #-}
Or directly in your project .cabal file, if you want to use in every module by default:
default-extensions: NoImplicitPrelude
Then add the following import to your modules:
import Universum
If you’re using Emacs and don’t want to
type import Universum manually every time, you can
modify your configs
a little bit.
If you want to get familiar with universum internal structure, you can just
read top-level documentation for
Universum
module.
Gotchas ↑
- head,- tail,- last,- init,- foldl1,- minimumand other were-partial functions work with- NonEmpty ainstead of- [a].
- Safe analogue for head,foldl1,foldr1,minimum,maximumfunctions, for instance:safeHead :: [a] -> Maybe a.
- undefinedtriggers a compiler warning, which is probably not what you want. Either use- throwIO,- Except,- erroror- bug.
- mapis- fmapnow.
- Multiple sorting functions are available without imports:
- sortBy :: (a -> a -> Ordering) -> [a] -> [a]: sorts list using given custom comparator.
- sortWith :: Ord b => (a -> b) -> [a] -> [a]: sorts a list based on some property of its elements.
- sortOn :: Ord b => (a -> b) -> [a] -> [a]: just like- sortWith, but more time-efficient if function is calculated slowly (though less space-efficient). So you should write- sortOn length(would sort elements by length) but- sortWith fst(would sort list of pairs by first element).
 
- Functions sumandproductare strict now, which makes them more efficient.
- If you try to do something like putStrLn "hi", you’ll get an error message ifOverloadedStringsis enabled – it happens because the compiler doesn’t know what type to infer for the string. UseputTextLnin this case.
- Since showdoesn’t come fromShowanymore, you can’t writeShowinstances easily. See migration guide for details.
- You can’t call some Foldablemethods overMaybeand some other types.Foldablegeneralization is useful but potentially error-prone. Instead we created our own fully compatible withFoldableContainertype class but that restricts the usage of functions likelengthoverMaybe,Either,Identityand tuples. We’re also using GHC 8 feature of custom compile-time errors to produce more helpful messages.
- As a consequence of previous point, some functions like traverse_,forM_,sequenceA_, etc. are generalized overContainertype classes.
- errortakes- Text.
- We are exporting a rewrite rule which replaces toString . toText :: Text -> Textwithid. Note that this changes semantics in some corner cases.
Things that you were already using, but now you don’t have to import them explicitly ↑
Commonly used libraries
First of all, we reexport some generally useful modules: Control.Applicative,
Data.Traversable, Data.Monoid, Control.DeepSeq, Data.List, and lots of others.
Just remove unneeded imports after importing Universum (GHC should tell you which ones).
Then, some commonly used types: Map/HashMap/IntMap, Set/HashSet/IntSet, Seq, Text and ByteString
(as well as synonyms LText and LByteString for lazy versions).
liftIO and MonadIO are exported by default. A lot of IO functions are generalized to MonadIO.
deepseq is exported. For instance, if you want to force deep evaluation of some value (in IO),
you can write evaluateNF a. WHNF evaluation is possible with evaluateWHNF a.
We also reexport big chunks of these libraries: mtl, stm, microlens, microlens-mtl.
Bifunctor
type class with useful instances is exported.
- firstand- secondfunctions apply a function to first/second part of a tuple (for tuples).
- bimaptakes two functions and applies them to first and second parts respectively.
Text
We export Text and LText, and some functions work with Text instead of String –
specifically, IO functions (readFile, putStrLn, etc) and show. In fact, show
is polymorphic and can produce strict or lazy Text, String, or ByteString.
Also, toText/toLText/toString can convert Text|LText|String types to Text/LText/String. If you want to convert to and from ByteString use encodeUtf8/decodeUtf8 functions.
Debugging and undefineds
trace, traceM, traceShow, etc. are available by default. GHC will warn you
if you accidentally leave them in code, however (same for undefined).
We also have data Undefined = Undefined (which, too, comes with warnings).
Exceptions
We use safe-exceptions
library for exceptions handling. Don’t import Control.Exceptions
module explicitly. Instead use functionality from safe-exceptions
provided by universum or import Control.Exceptions.Safe module.
What’s new? ↑
Finally, we can move to part describing the new cool features we bring with universum.
- 
unconssplits a list at the first element.
- 
ordNubandsortNubare O(n log n) versions ofnub(which is quadratic) andhashNubandunstableNubare almost O(n) versions ofnub.
- 
(&)– reverse application.x & f & ginstead ofg $ f $ xis useful sometimes.
- 
whenM,unlessM,ifM,guardMare 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.
- 
readMaybeandreadEitherare likereadbut total and give eitherMaybeorEitherwith parse error.
- 
when(Just|Nothing|Left|Right|NotEmpty)[M][_]let you conditionally execute something. Before:case mbX of Nothing -> return () Just x -> ... x ...After: whenJust mbX $ \x -> ... x ...
- 
for_for loops. There’s alsoforM_butfor_looks a bit nicer.for_ [1..10] $ \i -> do ...
- 
andM,allM,anyM,orMare monadic version of corresponding functions frombase.
- 
Type operator $for writing types likeMaybe $ Either String $ Maybe Int.
- 
Eachtype family. So this:f :: Each [Show, Read] [a, b] => a -> b -> Stringtranslates into this: f :: (Show a, Show b, Read a, Read b) => a -> b -> String
- 
Withtype operator. So this:a :: With [Show, Read] a => a -> atranslates into this: a :: (Show a, Read a) => a -> a
- 
Variadic composition operator (...). So you can write:ghci> (show ... (+)) 1 2 "3" ghci> show ... 5 "5" ghci> (null ... zip5) [1] [2] [3] [] [5] True ghci> let process = map (+3) ... filter ghci> process even [1..5] [5,7]
- 
Conversions between EitherandMaybelikerightToMaybeandmaybeToLeftwith clear semantic.
- 
using(Reader|State)[T]functions as aliases forflip run(Reader|State)[T].
- 
Onetype class for creating singleton containers. Even monomorhpic ones likeText.
- 
evaluateWHNFandevaluateNFfunctions as clearer and lifted aliases forevaluateandevaluate . force.
- 
ToPairstype class for data types that can be converted to list of pairs (likeMaporHashMaporIntMap).
Migration guide from Prelude ↑
In order to replace default Prelude with universum you should start with instructions given in
how to use universum section.
This section describes what you need to change to make your code compile with universum.
- 
Enable -XOverloadedStringsand-XTypeFamiliesextension by default for your project.
- 
Since head,tail,minimumand some other functions work forNonEmptyyou should refactor your code in one of the multiple ways described below:- Change [a]toNonEmpty awhere it makes sense.
- Use functions which return Maybe. They can be implemented usingnonEmptyfunction. Likehead <$> nonEmpty l.- head <$> nonEmpty lis- safeHead l
- tailis- drop 1. It’s almost never a good idea to use- tailfrom- Prelude.
 
- Add import qualified Universum.Unsafe as Unsafeand replace function with qualified usage.
 
- Change 
- 
If you use fromJustor!!you should use them fromimport qualified Universum.Unsafe as Unsafe.
- 
Derive or implement Containerinstances for your data types which implementFoldableinstances. This can be done in a single line becauseContainertype class automatically derives fromFoldable.
- 
Containertype class fromuniversumreplacesFoldableand doesn’t have instances forMaybe a,(a, b),Identity aandEither a b. If you usefoldrorforM_or similar for something likeMaybe ayou should replace usages of such function with monomorhpic alternatives:- 
Maybe- (?:) :: Maybe a -> a -> a
- fromMaybe :: a -> Maybe a -> a
- maybeToList :: Maybe a -> [a]
- maybeToMonoid :: Monoid m => Maybe m -> m
- maybe :: b -> (a -> b) -> Maybe a -> b
- whenJust :: Applicative f => Maybe a -> (a -> f ()) -> f ()
- whenJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m ()
 
- 
Either- fromLeft :: a -> Either a b -> a
- fromRight :: b -> Either a b -> b
- either :: (a -> c) -> (b -> c) -> Either a b -> c
- whenRight :: Applicative f => Either l r -> (r -> f ()) -> f ()
- whenRightM :: Monad m => m (Either l r) -> (r -> m ()) -> m ()
 
 
- 
- 
If you have types like foo :: Foldable f => f a -> a -> ayou should chose one of the following:- Right: Modify types for- Containerlike- foo :: (Container t, Element t ~ a) => t -> a -> a.
- Left: Import- Data.Foldablemodule- qualifiedand use everything- Foldable-related qualified.
 
- 
Forget about Stringtype.- Replace putStrandputStrLnwithputTextandputTextLn.
- Replace (++)with(<>)forString-like types.
- Try to use fmtlibrary if you need to construct messages.
- Use toText/toLText/toStringfunctions to convert toText/LazyText/Stringtypes.
- Use encodeUtf8/decodeUtf8to convert to/fromByteString.
 
- Replace 
- 
Run hlintusing.hlint.yamlfile fromuniversumpackage to cleanup code and imports.
- 
Since vanilla showfrom theShowclass is not available, your customShowinstances will fail to compile. You canimport qualified Text.Showto bring vanillashowto scope with qualified name. It will not conflict withshowfromuniversumand yourShowinstances will compile successfully.
Changes
1.8.3
1.8.2.2
- #297
- Add support for GHC-9.10 without any user-visible changes.
 
1.8.2.1
- #293
- Add explicit kind signatures for custom operators.
- Bump some dependency constraints to support GHC-9.8.
 
1.8.2
- #289:
Make universum work with LTS-21.0.
- Re-export (~)type operator.
 
- Re-export 
- #283:
Bump the upper version bound on textto2.0.2.
1.8.1.1
- #282:
Bump the upper version bound on textto2.0.1.
1.8.1
- #271: Add compatibility with tasty-hedgehog 1.2.0.0
1.8.0
- 
#252: Remove Optionre-export. UseMaybeinstead.
- 
#176: Deprecate note.
- 
#206: Remove listToMaybe. Migration guide: usesafeHeaddirectly with functions fromUniversum.Containerinstead.
- 
#182: Deprecate microlensandmicrolens-mtldependencies.
- 
#165: Change the type of readMaybefromreadMaybe :: Read a => String -> Maybe ato it’s polymorphic versionreadMaybe :: forall b a. (ToString a, Read b) => a -> Maybe b.
- 
#199: Change type of concatMapfromconcatMap :: Foldable f => (a -> [b]) -> t a -> [b]toconcatMap :: Container c => (Element c -> [b]) -> c -> [b].
- 
250: Replace groupexport fromData.Listwithgroup,groupBy,groupWithandgroupAllWithfromData.List.NonEmpty.
1.7.3
- 
#236: Add updateMVar'andupdateTVar'.
- 
#244 Add ToPairsinstances for[(k, v)]andNonEmpty (k, v).
- 
#238: Add fromList.
1.7.2 (rev1)
- Permit text-1.2.5.0.
1.7.2
- Permit text-1.2.4.1.
- #233:
Add someNE.
1.7.1
1.7.0
- #221:
Add safe versions of minimum,maximum,minimumBy,maximumBy,foldr1,foldl1functions forNonEmptylist. Old their versions fromContainertypeclass now returnMaybeand havesafeprefix in name (e.g.safeMinimum). Add unsafe versions of those functions toUnsafemodule.
- #185: Enable more warnings, fix all warnings.
1.6.1
- #219:
Bump upper bound on text.
1.6.0
- 
#207: Remove various monad transformer combinators, flipfoldl', and<<$>>from the list of changes suggested in.hlint.yaml.
- 
#214: Update supported GHC versions (replace 7.10.3 with 8.6.5). 
- 
#212 Added rewrite rule for toString . toTextcase. This may change semantics in some corner cases (becausetoString . toTextis not strictly the identity function).
- 
#215: Fix docstrings in Universum.Lifted.Fileto mention correct module when referencing related functions.
1.5.0
- 
Make error’s stacktrace exclude site of theerrorfunction itself.
- 
#200: Implemented a lifted version of withFileand addedhClosetoUniversum.Lifted.Fileas discussed previously in #186.
- 
#204: Make tracenon-polymorphic over text argument, addtraceIdWithandtraceShowIdWith.
- 
#197 hPutStr,hPutStrLnandhPrintadded toUniversum.Print. The interface for the backing typeclassUniversum.Print.Printchanged. It was also moved to the internal moduleUniversum.Print.Internaland should be considered unstable.Migration guide: The interface for the Printclass should be considered internal and may be subject to sudden change. If you must implement your own instances, then importUniversum.Print.Internal(be aware that there are name clashes in the functions fromUniversum.PrintandUniversum.Print.Internal)
- 
#201 Generalized the type of Universum.Lifted.Env.die. Should not break existing code, apart from, perhaps, type inference.
1.4.0
- 
#167: identityhas been removed.Migration guide: use Universum.idinstead.
- 
#177: The mask_reexport fromsafe-exceptionshas been removed.Migration guide: use Control.Exception.Safe.mask_fromsafe-exceptionsinstead.
- 
#178: getArgshas been removed.Migration guide: use liftIOdirectly withSystem.Environment.getArgsfrom base.
- 
#179: getContentsandinteracthave been removed.Migration guide: use liftIOdirectly withData.Text.Lazy.IO.getContentsandData.Text.Lazy.IO.interact, both from thetextpackage.
- 
#180: The Lifted.STmodule has been removed.Migration guide: use liftIOdirectly with functions fromControl.Monad.STinstead.
- 
#181: listhas been removed.
1.3.0
- 
#167: identityhas been deprecated.Migration guide: use Universum.idinstead.
- 
#170: Remove ElementConstraintfrom theContainerclass.Migration guide: remove ElementConstraintfrom every instance and every type signature.
- 
#174 The type-operatorsdependency has been removed.
- 
#177: The mask_reexport fromsafe-exceptionshas been deprecated.Migration_guide: use Control.Exception.Safe.mask_fromsafe-exceptionsinstead.
- 
#178: getArgshas been deprecated. To be removed in a future version.Migration guide: use liftIOdirectly withSystem.Environment.getArgsfrombase.
- 
#179: getContentsandinteracthave been deprecated.Migration guide: use liftIOdirectly withData.Text.Lazy.IO.getContentsandData.Text.Lazy.IO.interact, both from thetextpackage.
- 
#180: The Lifted.STmodule has been deprecated. To be removed in a future version.Migration guide: use liftIOdirectly with functions fromControl.Monad.STinstead.
- 
#181: listhas been deprecated. To be removed in a future version.
1.2.0
- 
#159 Breaking change: Remove text-formatdependency.Migration guide: import Buildabletype class either fromtext-formatorformattingorfmtlibrary. There is no direct replacement forprettyandprettyLin popular libraries. You can defineprettyL = Data.Text.Lazy.Builder.toLazyText . buildandpretty = Data.Text.Lazy.toStrict. prettyL`.
- 
#164: Don’t reexport log :: Floating a => a -> a.
1.1.1
- #148:
Add CODEOWNERSand contributing guide.
- #135: Add documentation regarding internal module structure.
- #113:
Annotate atfunction fromUnsafemodule andordNubfunction fromNubmodule withliquidhaskell.
- #73: Add more examples to docs and fix warnings where possible.
- Move reexport of NonEmptytoUniversum.Listmodule.
1.1.0
- #144:
Add Excpattern synonym.
- #60:
Reexport Naturaltype fromNumeric.Naturamodule.
- #118:
Reexport TypefromData.Kindmodule.
- #130:
Merge ToListandContainertype classes into single type classContainer.
- #15:
Add ?:function toUniversum.Monad.Maybe.
- #128:
Add Unsafemodule with unsafe functions to works with lists andMaybe.
- #129:
Reexport id.
- #136:
Change foldl'type back, addflipfoldl'instead.
1.0.4.1
- #127:
Fix doctestfortext-1.2.3.
1.0.4
- #53:
Add doctesttouniversum. Also imporove and fix documentation.
- #117:
Drop the support of GHC-8.0.1.
- #104:
Reexport hashWithSaltfromData.Hashable.
- #95:
Reexport ComposefromData.Functor.Compose.
- #124:
Export methods of class Exception.
1.0.3
- #114:
Reexport more functions from safe-exceptions.
1.0.2
- #91:
Change argument order of foldl'.
- #97:
Add ToPairstype class with the ability to have list of pairs.
1.0.1
- #100:
Add bugfunction =impureThrow.
1.0.0
- #90: Improve project structure.
- #89:
Add export of Universum.Nubmodule toUniversum.
- Add listToMaybetoUniversum.Monad.Reexport.
- #81:
Make putTextandputLTextto be versions ofputStr. AddputTextLnandputLTextLn– versions ofputStrLn.
- #5:
Add safe versions of head,tail,init,lastfunctions forNonEmptylist. Oldhead(which returnsMaybe) is renamed tosafeHead. Reexports fromsafeare removed.
- Remove unsnoc(this function is very slow and shouldn’t be used).
- #88:
Add HasCallStack =>toerrorandundefinedfunctions.
- #58:
Make Elementtype family be associated type family. Remove{-# OVERLAPPABLE #-}instance forToListandContainer. Add default instances for basic types. RemoveWrappedListnewtypebecause it’s not needed anymore. RemoveNontrivialContainerconstraint alias.
- #56:
Make elemandnotElemfaster forSetandHashSetby introducingElementConstraintassociated type family.
- Remove Unsafemodule. Though, see issue #128 for disuccion regarding possible return of this module.
0.9.1
- Change baseversion to be< 5.
0.9.0
- #79: Import ‘(<>)’ from Semigroup, not Monoid.
- Improve travis configartion.
- #80:
Rename ContainertoToList,NontrivialContainertoContainer. KeepNontrivialContaineras type alias.
- Rename Containersmodule toContainer.Class.
- Move all container-related reexports from UniversumtoContainer.Reexport.
- Add default implementation of nullfunction.
- Add WrappedListnewtype with instance ofContainer.
- Improve compile time error messages for disallowed instances.
0.8.0
- #83:
Change the order of types in showandprintfunctions.
- Move string related reexports and functions to Convmodule.
- Rename Convmodule toString.
- Move printfunction toPrintmodule.
- #77:
Add modify'function to export list.
0.7.1.1
- #69:
Document SuperCompositionoperator(...).
0.7.1
- #68:
Separate all ‘nub’ functions to Nubmodule, addsortNubandunstableNubthere.
- #54: Reorganize .cabal.
- #21: Add benchmarks.
- #65:
Use TypeNatsinstead ofTypeLitswhen possible.
0.7.0
- #47:
Reexport putandgetforMonadState.
- #48:
Export boxed Vectortype.
- #49:
Export IdentityTandrunIdentityT.
- #51:
Add fromRightandfromLeftthat behave likefromMaybebut forEither.
- #52:
Add maybeToMonoid :: Monoid m => Maybe m -> m.
- Remove Symbol-related types for sure.
- Return back seems to be useful function guardMremoved inv0.3.
- Add notElemforNonTrivialContainer.
0.6.1
- Fixed version number bug (it had 4 numbers).
0.6.0.0
- #62: Export exceptions-related functions from ‘safe-exceptions’.
0.5.1
- Fix an infinite loop in decodeUtf8fromTexttoByteString.Lazy.
0.5
- Export MonadTranstypeclass.
- Remove Symbol-related exports fromGHC.TypeLits.
- Remove SrcLocandLocationreexports fromGHC.ExecutionStack.
- Add Withtype operator.
- Add hashNub.
- Export strict StateTinstead of lazy.
0.4.3
- Assign associativity and priority to (…), export typeclass itself.
0.4.2
- #25: Add vararg functions composition operator (…).
- Rewrite concatMapM&concatForMso that they allow traversed and returned-by-function container types differ.
0.4.1
- Reexport sortWithfromGHC.Exts.
0.4
- Add haddock documentation with 100% coverage.
- Rewrite README tutorial.
- #37:
Add generalized version of readEither.
- #38:
Add evaluateNF,evaluateNF_,evaluateWHNF,evaluateWHNF_.
- #39:
Add lifted versions of IOReffunctions.
- Remove foreach
- Reexport (&&&)fromControl.Arrow.
- Add lifted version of readTVarIO.
- interactand- getContentswork with Lazy Text.
- Reexport MaybeT,maybeToExceptT,exceptToMaybeT.
0.3
- #28:
Remove putByteStringandputLByteString.
- #29:
Remove panic,FatalErrorandnotImplemented. RenameNotImplementedintoUndefined.
- #32:
Remove orAlt,orEmpty,liftAA2,eitherA,purer,<<*>>,traceIO,guardM,hush,tryIO,liftM',liftM2',applyN,guardedA, Bifunctor instances for tuples of length higher than 2. GeneralizeconcatMapM, addconcatForMand operator versions.
- #35:
Generalize andM,orM,allM,anyMover container type.
0.2.2
- #33:
Add ($)andEachtype operators.
0.2.1
- #24:
Add whenNothing,whenNothing_,whenNothingM,whenNothingM_,whenLeft,whenLeftM,whenRight,whenRightM,whenNotNull,whenNotNullM.
- #26:
Add usingReader,usingReaderT,usingState,usingStateT,executingState,executingStateT,evaluatingState,evaluatingStateT.
- Remove maybeToEither.
0.2
- Add one(similar tosingleton).
- Expose SymbolandNattypes fromGHC.TypeLitsby default.
- Export genericLengthand other generic list return functions.
- Rename msgtofatalErrorMessage.
- Export ExceptT
- Export ReaderT, andStateTconstructors.
- Export NonEmptytype and constructor for Base 4.9 only.
- Export Data.Semigrouptype and functions for Base 4.9 only.
- Export String.
0.1.13
- Add lenses from microlens.
- Add (<&>).
- Reexport (&)fromData.Functionif it’s present there instead of always defining our own (this is actually done by reexporting it fromLens.Microwhich does the right thing).
- Fix a space leak in whenJust.
0.1.12
- 
Use custom classes instead of Foldable. Thanks to this,lengthand similar functions can’t anymore be used on tuples orMaybe, but can be used on e.g.Text,ByteStringandIntSet.
- 
Add allM,anyM,andM,orM.
- 
Reexport failandMonadFail.
0.1.11
- Expose putByteStringandputLByteStringmonomorphic versions ofputStrLnfunctions
- Switch exported (<>)to be fromData.Monoidinstead of Semigroup.
- Export Hashable
0.1.10
- Generalize most IOfunctions toMonadIO
- Make dieavailable for older versions of base
0.1.9
- Make sumandproductstrict
0.1.8
- foreachfor applicative traversals.
- hushfunction for error handling.
- tryIOfunction for error handling.
- passfunction for noop applicative branches.
- Mask Handlertypeclass export.
- Mask yieldfunction export.
0.1.7
- Export monadic (>>)operator by default.
- Add traceIdandtraceShowIdfunctions.
- Exportreaderandstatefunctions by default.
- Export lifted throwIOandthrowTofunctions.
0.1.6
- Add uncatchable panic exception throwing using Text message.
- Remove printf
- Remove string-convdependency so Stack build works withoutextra-deps.
- Bring Callstackmachinery in for GHC 8.x.
- Remove throwandassertfromControl.Exceptionexports.
- Remove unsafeShiftLandunsafeShiftRfromData.Bitsexports.
- Reexport throwasunsafeThrowvia Unsafe module.
- Hides all Show class functions. Only the Class itself is exported. Forbids custom instances that are not GHC derived.
- ExportencodeUtf8anddecodeUtf8functions by default.
- Adds unsnocfunction.
0.1.5
- Initial release.
