@hackage base-orphans0.8
Backwards-compatible orphan instances for base
Categories
License
MIT
Maintainer
Simon Hengel <sol@typeful.net>, João Cristóvão <jmacristovao@gmail.com>, Ryan Scott <ryan.gl.scott@gmail.com>
Links
Versions
Installation
Tested Compilers
Dependencies (2)
Dependents (78)
@hackage/Cabal, @hackage/transformers-base, @hackage/getopt-generics, @hackage/prim-instances, @hackage/test-framework, @hackage/cabal-plan, Show all…
base-orphans
Scope
base-orphans defines orphan instances that mimic instances available in later
versions of base to a wider (older) range of compilers. base-orphans does
not export anything except the orphan instances themselves and complements
base-compat.
Note that base-orphans doesn't cover every possible instance. See the
What is not covered section for exceptions.
Usage
To use base-orphans, simply import Data.Orphans ().
What is covered
Alternative,MonadPlus, andMonadZipinstances forProxyAlternative,Applicative,Bounded,Data,Enum,Foldable,Functor,Ix,Monad,MonadFix,MonadPlus,MonadZip, andTraversableinstances for data types inGHC.GenericsAlternative,Eq,Ord,Read,Show,Foldable, andTraversableinstances forZipListApplicativeinstance forK1fromGHC.GenericsApplicative,Data,Eq1,Foldable,Functor,Ord1,Monad,MonadFix,MonadZip,Monoid,Num,Read,Read1,Semigroup,Show,Show1, andTraversableinstances forDownApplicativeandAlternativeinstances forReadPandReadPrecApplicativeinstance for strict and lazySTApplicative,Foldable,Functor,Monad, andTraversableinstances forComplex,Dual,First,Last,Product, andSumBitsinstance forBoolBits,Bounded, andIntegralinstances forCDevBits,Bounded,Enum,FiniteBits,Floating,Fractional,Integral,IsString,Ix,Num,Real,RealFloat,RealFrac, andStorableinstances forConstandIdentityDatainstances forAll,Any, andConst,IntPtr, andWordPtrData,MonadFixandMonadZipinstances forAlt,Dual,First,Last,Product, andSumDataandIsListinstances forVersionEqandOrdinstances forControl.Exception.ErrorCallEq,Ord,Read, andShowinstances for data types inGHC.GenericsEq1,Ord1,Read1, andShow1instances forNonEmptyFoldableinstance forEither,(,)andConstFoldableandTraversableinstances forAltfromData.MonoidFunctorinstance forHandler,ArgOrder,OptDescr, andArgDescrFunctor,Applicative,Alternative, andMonadPlusinstances forArrowMonadMonadinstance for(,)Monadinstance forWrappedMonadMonadFail,Monoid, andSemigroupinstances for strictSTMonadZipinstance forMaybeMonoid,Eq,Ord,Read, andShowinstances forConstMonoidinstances forIdentityandIONuminstance forSumandProductReadinstance forFixedSemigroupinstances forIO,EventandLifetimeSemigroupinstances forV1,U1,Par1,Rec1,K1,M1,(:*:), and(:.:)fromGHC.Generics.Monoidinstances for the same types (exceptV1).Showinstance forFingerprintStorableinstance for(),Complex, andRatioTraversableinstance forEither,(,)andConstTypeableinstance for most data types, typeclasses, and promoted data constructors (when possible)
What is not covered
base-orphans does not define the following instances:
GenericorGeneric1instances. These can be found in theGenerics.Deriving.Instancesmodule of thegeneric-derivinglibrary.- The
Alternative IOandMonadPlus IOinstances. These can be found in theControl.Monad.Trans.Errormodule of thetransformerslibrary.
Supported versions of GHC/base
ghc-8.6.1/base-4.12.0.0ghc-8.4.3/base-4.11.1.0ghc-8.4.2/base-4.11.1.0ghc-8.4.1/base-4.11.0.0ghc-8.2.2/base-4.10.1.0ghc-8.2.1/base-4.10.0.0ghc-8.0.2/base-4.9.1.0ghc-8.0.1/base-4.9.0.0ghc-7.10.3/base-4.8.2.0ghc-7.10.2/base-4.8.1.0ghc-7.10.1/base-4.8.0.0ghc-7.8.4/base-4.7.0.2ghc-7.8.3/base-4.7.0.1ghc-7.8.2/base-4.7.0.0ghc-7.8.1/base-4.7.0.0ghc-7.6.3/base-4.6.0.1ghc-7.6.2/base-4.6.0.1ghc-7.6.1/base-4.6.0.0ghc-7.4.2/base-4.5.1.0ghc-7.4.1/base-4.5.0.0ghc-7.2.2/base-4.4.1.0ghc-7.2.1/base-4.4.0.0ghc-7.0.4/base-4.3.1.0ghc-7.0.3/base-4.3.1.0ghc-7.0.2/base-4.3.1.0ghc-7.0.1/base-4.3.0.0
We also make an attempt to keep base-orphans building with GHC HEAD, but due
to its volatility, it may not work at any given point in time. If it doesn't,
please report it!
Patches are welcome; add tests for new code!