base-orphans: Backwards-compatible orphan instances for base

[ compatibility, library, mit ] [ Propose Tags ]

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 <http://hackage.haskell.org/package/base-compat base-compat>.

See the README for what instances are covered: https://github.com/haskell-compat/base-orphans#readme. See also the what is not covered section.


[Skip to Readme]
Versions [faq] 0, 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.6, 0.7, 0.8, 0.8.1, 0.8.2, 0.8.3 (info)
Change log CHANGES.markdown
Dependencies base (>=4.3 && <5), ghc-prim [details]
License MIT
Copyright (c) 2012-2017 Simon Hengel, (c) 2014-2017 João Cristóvão, (c) 2015-2017 Ryan Scott
Author Simon Hengel <sol@typeful.net>, João Cristóvão <jmacristovao@gmail.com>, Ryan Scott <ryan.gl.scott@gmail.com>
Maintainer Simon Hengel <sol@typeful.net>, João Cristóvão <jmacristovao@gmail.com>, Ryan Scott <ryan.gl.scott@gmail.com>
Category Compatibility
Home page https://github.com/haskell-compat/base-orphans#readme
Bug tracker https://github.com/haskell-compat/base-orphans/issues
Source repo head: git clone https://github.com/haskell-compat/base-orphans
Uploaded by ryanglscott at 2020-09-30T17:45:39Z
Distributions Arch:0.8.3, Debian:0.7, Fedora:0.8.2, FreeBSD:0.4.4, LTSHaskell:0.8.1, NixOS:0.8.3, Stackage:0.8.1, openSUSE:0.8.2
Downloads 113706 total (1806 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-09-30 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for base-orphans-0.8.3

[back to package description]

base-orphans

Hackage Hackage Dependencies Haskell Programming Language BSD3 License Build

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, and MonadZip instances for Proxy
  • Alternative, Applicative, Bounded, Data, Enum, Foldable, Functor, Ix, Monad, MonadFix, MonadPlus, MonadZip, and Traversable instances for data types in GHC.Generics
  • Alternative, Eq, Ord, Read, Show, Foldable, and Traversable instances for ZipList
  • Applicative instance for K1 from GHC.Generics
  • Applicative, Bits, Bounded, Data, Enum, Eq1, FiniteBits, Floating, Foldable, Fractional, Functor, Integral, Ix, Ord1, Monad, MonadFix, MonadZip, Monoid, Num, Read, Read1, Real, RealFloat, RealFrac, Semigroup, Show, Show1, Storable, and Traversable instances for Down
  • Applicative and Alternative instances for ReadP and ReadPrec
  • Applicative instance for strict and lazy ST
  • Applicative, Foldable, Functor, Monad, and Traversable instances for Complex, Dual, First, Last, Product, and Sum
  • Bits instance for Bool
  • Bits, Bounded, and Integral instances for CDev
  • Bits, Bounded, Enum, FiniteBits, Floating, Fractional, Integral, IsString, Ix, Num, Real, RealFloat, RealFrac, and Storable instances for Const and Identity
  • Data instances for All, Any, and Const, IntPtr, WordPtr, WrappedArrow and WrappedMonad
  • Data, MonadFix and MonadZip instances for Alt, Dual, First, Last, Product, and Sum
  • Data and IsList instances for Version and ZipList
  • Eq and Ord instances for Control.Exception.ErrorCall
  • Eq, Ord, Read, and Show instances for data types in GHC.Generics
  • Eq1, Ord1, Read1, and Show1 instances for NonEmpty
  • Foldable instance for Either, (,) and Const
  • Foldable and Traversable instances for Alt from Data.Monoid
  • Functor, Applicative, and Monad instances for (,,) a b and (,,,) a b c
  • Functor instance for Handler, ArgOrder, OptDescr, and ArgDescr
  • Functor, Applicative, Alternative, and MonadPlus instances for ArrowMonad
  • Functor, Applicative, Monad, Alternative, and MonadPlus instances for Kleisli
  • Ix instances for tuples of size 6 through 15
  • Monad instance for (,)
  • Monad instance for WrappedMonad
  • MonadFail, Monoid, and Semigroup instances for strict ST
  • MonadFix and MonadZip instances for Complex
  • MonadZip instance for Maybe
  • Monoid, Eq, Ord, Read, and Show instances for Const
  • Monoid instances for Identity and IO
  • Num instance for Sum and Product
  • Read instance for Fixed
  • Semigroup instances for IO, Event and Lifetime
  • Semigroup instances for V1, U1, Par1, Rec1, K1, M1, (:*:), and (:.:) from GHC.Generics. Monoid instances for the same types (except V1).
  • Show instance for Fingerprint
  • Storable instance for (), Complex, and Ratio
  • TestEquality instance for Compose
  • Traversable instance for Either, (,) and Const
  • Typeable instance for most data types, typeclasses, and promoted data constructors (when possible)

What is not covered

base-orphans does not define the following instances:

Supported versions of GHC/base

  • ghc-9.0.* / base-4.15.*
  • ghc-8.10.* / base-4.14.*
  • ghc-8.8.* / base-4.13.*
  • ghc-8.6.* / base-4.12.*
  • ghc-8.4.* / base-4.11.*
  • ghc-8.2.* / base-4.10.*
  • ghc-8.0.* / base-4.9.*
  • ghc-7.10.* / base-4.8.*
  • ghc-7.8.* / base-4.7.*
  • ghc-7.6.* / base-4.6.*
  • ghc-7.4.* / base-4.5.*
  • ghc-7.2.* / base-4.4.*
  • ghc-7.0.* / base-4.3.*

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!