base-orphans

Backwards-compatible orphan instances for base

https://github.com/haskell-compat/base-orphans#readme

Version on this page:0.3.3@rev:1
LTS Haskell 22.17:0.9.1
Stackage Nightly 2024-04-18:0.9.1
Latest on Hackage:0.9.1

See all snapshots base-orphans appears in

MIT licensed and maintained by Simon Hengel, João Cristóvão, Ryan Scott
This version can be pinned in stack with:base-orphans-0.3.3@sha256:5074bcb67706082528ac41623e7ae8978d6f4a3eaef29c2426ee991e6849a844,2447

Module documentation for 0.3.3

Depends on 2 packages(full list with versions):
Used by 5 packages in nightly-2015-06-22(full list with versions):

base-orphans Hackage version Build Status

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.

Usage

To use base-orphans, simply import Data.Orphans ().

What is covered

  • Added Applicative and Alternative instances for ReadP and ReadPrec
  • Added Eq and Ord instances for Control.Exception.ErrorCall
  • Added Eq, Ord, Read, and Show instances for data types in GHC.Generics
  • Added Functor, Applicative, and Monad instances for First and Last
  • Added Monoid, Eq, Ord, Read, and Show instances for Const
  • Added Read and Show instances for Down
  • Added Eq, Ord, Read, and Show instances for ZipList
  • Added Monad instance for WrappedMonad
  • Added Data and IsList instances for Version
  • Applicative instance for strict and lazy ST
  • Bits instance for Bool
  • Generic instances for the data types in GHC.Generics
  • Generic instance for All, Any, Const, Dual, Endo, First, Last, Product, Sum, WrappedArrow, WrappedMonad, and ZipList
  • Generic1 instance for Const, Dual, First, Last, Product, Sum, WrappedArrow, WrappedMonad, and ZipList
  • Foldable instance for Either, (,) and Const
  • Functor instance for ArgOrder, OptDescr, and ArgDescr
  • Num instance for Sum and Product
  • Read instance for Fixed
  • Show instance for Fingerprint
  • Storable instance for Complex and Ratio
  • Traversable instance for Either, (,) and Const
  • Typeable instance for most data types, typeclasses, and promoted data constructors (when possible)

Supported versions of GHC/base

  • ghc-7.10.1 / base-4.8.0.0
  • ghc-7.8.4 / base-4.7.0.2
  • ghc-7.8.3 / base-4.7.0.1
  • ghc-7.8.2 / base-4.7.0.0
  • ghc-7.8.1 / base-4.7.0.0
  • ghc-7.6.3 / base-4.6.0.1
  • ghc-7.6.2 / base-4.6.0.1
  • ghc-7.6.1 / base-4.6.0.0
  • ghc-7.4.2 / base-4.5.1.0
  • ghc-7.4.1 / base-4.5.0.0
  • ghc-7.2.2 / base-4.4.1.0
  • ghc-7.2.1 / base-4.4.0.0
  • ghc-7.0.4 / base-4.3.1.0
  • ghc-7.0.3 / base-4.3.1.0
  • ghc-7.0.2 / base-4.3.1.0
  • ghc-7.0.1 / base-4.3.0.0

Patches are welcome; add tests for new code!

Changes

Changes in 0.3.3

  • Typeable instances for (~), Any, Constraint, CSigset, Handler, Opaque, SPEC, and every promotable data constructor in base

Changes in 0.3.2

  • Storable (Complex a) instance no longer requires a RealFloat a constraint if using base-4.4 or later

Changes in 0.3.1

  • Functor, Applicative, and Monad instances for First and Last

Changes in 0.3.0

  • Show instance for Fingerprint
  • Data.Orphans is now Trustworthy
  • Backported the Generic and Generic1 instances available in base-4.7.0.0 to GHC 7.2, 7.4, and 7.6, namely
    • Const, WrappedMonad, and ZipList from Control.Applicative
    • WrappedArrow from Control.Category
    • All, Any, Dual, Endo, First, Last, Product, and Sum from Data.Monoid
    • U1, Par1, Rec1, K1, M1, (:+:), (:*:), (:.:), Arity, Associativity, and Fixity from GHC.Generics

Changes in 0.2.0

  • Drop GHC 6.12 (and base-4.2.0.0) compatibility
  • Fix Windows, GHCJS build
  • Read instance for Fixed
  • Applicative instances for strict and lazy ST
  • Typeable instance for SampleVar
  • Applicative and Alternative instances for ReadP and ReadPrec
  • Typeable instance for KProxy
  • Typeable instances for more data types in GHC.-prefixed modules
  • Generic instances for Arity, Associativity, and Fixity from the GHC.Generics module
  • Corrected the Generic instance for (:*:) to work around GHC bug #9830