• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

src/Data/H03-May-2022-1,9901,621

test/H03-May-2022-419328

CHANGES.markdownH A D09-Sep-20015.9 KiB140119

LICENSEH A D09-Sep-20011.1 KiB2117

README.markdownH A D09-Sep-20015.7 KiB11499

Setup.hsH A D09-Sep-200146 32

base-orphans.cabalH A D09-Sep-20012.9 KiB7771

README.markdown

1# `base-orphans`
2[![Hackage](https://img.shields.io/hackage/v/base-orphans.svg)][Hackage: base-orphans]
3[![Hackage Dependencies](https://img.shields.io/hackage-deps/v/base-orphans.svg)](http://packdeps.haskellers.com/reverse/base-orphans)
4[![Haskell Programming Language](https://img.shields.io/badge/language-Haskell-blue.svg)][Haskell.org]
5[![BSD3 License](http://img.shields.io/badge/license-MIT-brightgreen.svg)][tl;dr Legal: MIT]
6[![Build](https://img.shields.io/travis/haskell-compat/base-orphans.svg)](https://travis-ci.org/haskell-compat/base-orphans)
7
8[Hackage: base-orphans]:
9  http://hackage.haskell.org/package/base-orphans
10  "base-orphans package on Hackage"
11[Haskell.org]:
12  http://www.haskell.org
13  "The Haskell Programming Language"
14[tl;dr Legal: MIT]:
15  https://tldrlegal.com/license/mit-license
16  "MIT License"
17
18## Scope
19
20`base-orphans` defines orphan instances that mimic instances available in later
21versions of `base` to a wider (older) range of compilers. `base-orphans` does
22not export anything except the orphan instances themselves and complements
23[base-compat](http://hackage.haskell.org/package/base-compat).
24
25Note that `base-orphans` doesn't cover every possible instance. See the
26[What is not covered](#what-is-not-covered) section for exceptions.
27
28## Usage
29
30To use `base-orphans`, simply `import Data.Orphans ()`.
31
32## What is covered
33
34 * `Alternative`, `MonadPlus`, and `MonadZip` instances for `Proxy`
35 * `Alternative`, `Applicative`, `Bounded`, `Data`, `Enum`, `Foldable`, `Functor`, `Ix`, `Monad`, `MonadFix`, `MonadPlus`, `MonadZip`, and `Traversable` instances for data types in `GHC.Generics`
36 * `Alternative`, `Eq`, `Ord`, `Read`, `Show`, `Foldable`, and `Traversable` instances for `ZipList`
37 * `Applicative` instance for `K1` from `GHC.Generics`
38 * `Applicative`, `Bits`, `Bounded`, `Data`, `Enum`, `Eq1`, `FiniteBits`,
39   `Floating`, `Foldable`, `Fractional`, `Functor`, `Integral`, `Ix`, `Ord1`,
40   `Monad`, `MonadFix`, `MonadZip`, `Monoid`, `Num`, `Read`, `Read1`, `Real`,
41   `RealFloat`, `RealFrac`, `Semigroup`, `Show`, `Show1`, `Storable`, and
42   `Traversable` instances for `Down`
43 * `Applicative` and `Alternative` instances for `ReadP` and `ReadPrec`
44 * `Applicative` instance for strict and lazy `ST`
45 * `Applicative`, `Foldable`, `Functor`, `Monad`, and `Traversable` instances for `Complex`,
46   `Dual`, `First`, `Last`, `Product`, and `Sum`
47 * `Bits` instance for `Bool`
48 * `Bits`, `Bounded`, and `Integral` instances for `CDev`
49 * `Bits`, `Bounded`, `Enum`, `FiniteBits`, `Floating`, `Fractional`, `Integral`, `IsString`, `Ix`, `Num`, `Real`, `RealFloat`, `RealFrac`, and `Storable` instances for `Const` and `Identity`
50 * `Data` instances for `All`, `Any`, and `Const`, `IntPtr`, `WordPtr`,
51   `WrappedArrow` and `WrappedMonad`
52 * `Data`, `MonadFix` and `MonadZip` instances for `Alt`, `Dual`, `First`, `Last`,
53   `Product`, and `Sum`
54 * `Data` and `IsList` instances for `Version` and `ZipList`
55 * `Eq` and `Ord` instances for `Control.Exception.ErrorCall`
56 * `Eq`, `Ord`, `Read`, and `Show` instances for data types in `GHC.Generics`
57 * `Eq1`, `Ord1`, `Read1`, and `Show1` instances for `NonEmpty`
58 * `Foldable` instance for `Either`, `(,)` and `Const`
59 * `Foldable` and `Traversable` instances for `Alt` from `Data.Monoid`
60 * `Functor`, `Applicative`, and `Monad` instances for
61   `(,,) a b` and `(,,,) a b c`
62 * `Functor` instance for `Handler`, `ArgOrder`, `OptDescr`, and `ArgDescr`
63 * `Functor`, `Applicative`, `Alternative`, and `MonadPlus` instances for `ArrowMonad`
64 * `Functor`, `Applicative`, `Monad`, `Alternative`, and `MonadPlus` instances
65   for `Kleisli`
66 * `Monad` instance for `(,)`
67 * `Monad` instance for `WrappedMonad`
68 * `MonadFail`, `Monoid`, and `Semigroup` instances for strict `ST`
69 * `MonadZip` instance for `Maybe`
70 * `Monoid`, `Eq`, `Ord`, `Read`, and `Show` instances for `Const`
71 * `Monoid` instances for `Identity` and `IO`
72 * `Num` instance for `Sum` and `Product`
73 * `Read` instance for `Fixed`
74 * `Semigroup` instances for `IO`, `Event` and `Lifetime`
75 * `Semigroup` instances for `V1`, `U1`, `Par1`, `Rec1`, `K1`, `M1`, `(:*:)`, and `(:.:)` from `GHC.Generics`.
76   `Monoid` instances for the same types (except `V1`).
77 * `Show` instance for `Fingerprint`
78 * `Storable` instance for `()`, `Complex`, and `Ratio`
79 * `TestEquality` instance for `Compose`
80 * `Traversable` instance for `Either`, `(,)` and `Const`
81 * `Typeable` instance for most data types, typeclasses, and promoted data constructors (when possible)
82
83## What is not covered
84`base-orphans` does not define the following instances:
85
86* `Generic` or `Generic1` instances. These can be found in the
87  [`Generics.Deriving.Instances`](https://hackage.haskell.org/package/generic-deriving-1.8.0/docs/Generics-Deriving-Instances.html)
88  module of the [`generic-deriving`](https://hackage.haskell.org/package/generic-deriving)
89  library.
90* The `Alternative IO` and `MonadPlus IO` instances. These can be found in the
91  [`Control.Monad.Trans.Error`](http://hackage.haskell.org/package/transformers-0.4.3.0/docs/src/Control-Monad-Trans-Error.html#line-69)
92  module of the [`transformers`](http://hackage.haskell.org/package/transformers) library.
93
94## Supported versions of GHC/`base`
95
96 * `ghc-8.10.*` / `base-4.14.*`
97 * `ghc-8.8.*`  / `base-4.13.*`
98 * `ghc-8.6.*`  / `base-4.12.*`
99 * `ghc-8.4.*`  / `base-4.11.*`
100 * `ghc-8.2.*`  / `base-4.10.*`
101 * `ghc-8.0.*`  / `base-4.9.*`
102 * `ghc-7.10.*` / `base-4.8.*`
103 * `ghc-7.8.*`  / `base-4.7.*`
104 * `ghc-7.6.*`  / `base-4.6.*`
105 * `ghc-7.4.*`  / `base-4.5.*`
106 * `ghc-7.2.*`  / `base-4.4.*`
107 * `ghc-7.0.*`  / `base-4.3.*`
108
109We also make an attempt to keep `base-orphans` building with GHC HEAD, but due
110to its volatility, it may not work at any given point in time. If it doesn't,
111please report it!
112
113Patches are welcome; add tests for new code!
114