Prelude replacement.
Features
- No more
String Stringis removed in favor of lazyData.Text.Lazy.Text.- No more
Num The
Numtypeclass is now just for types which can be converted from integer literals.SemigroupsSemigroups are now in scope by default, as well as some useful wrappers.SemiringsA
Semiringhas the operations+and*, and the membersoneandzero.Boolis aSemiring, as isInteger, etc.Numis not a superclass ofSemiring.- Sensibly strict
Several functions, such as
foldl,sum,product, etc. are strict as default.- No unnecessary
Monads Functions such as
Control.Monad.sequence,Control.Monad.>>, andControl.Monad.replicateMare removed in favor of the equivalentsequenceA,*>, andreplicateAonApplicatives.- Fewer partial functions
Functions like
head,last,minimum, etc. now returnNothingwhen called on empty structures.tailandinitreturn empty lists when called on empty lists.- Data structures
MapandSet(the strict variants) are now in scope by default, with a minimal, non-colliding aliased api.- Transformers
Stateis now in scope by default.- Debugging
Handy functions like
trace,traceShow, andnotImplementedare in scope by default. They give warnings when used so they can't be forgotten.- Other handy functions
An O(n*log n)
nub,foldr2,converge,bool, and others.