| Copyright | (C) 2014 Jan Stolarek |
|---|---|
| License | BSD-style (see LICENSE) |
| Maintainer | jan.stolarek@p.lodz.pl |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Promotion.Prelude.Either
Description
Defines promoted functions and datatypes relating to Either,
including a promoted version of all the definitions in Data.Either.
Because many of these definitions are produced by Template Haskell,
it is not possible to create proper Haddock documentation. Please look
up the corresponding operation in Data.Either. Also, please excuse
the apparent repeated variable names. This is due to an interaction
between Template Haskell and Haddock.
- either_ :: forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
- type family Either_ (a :: TyFun a c -> Type) (a :: TyFun b c -> Type) (a :: Either a b) :: c where ...
- type family Lefts (a :: [Either a b]) :: [a] where ...
- type family Rights (a :: [Either a b]) :: [b] where ...
- type family PartitionEithers (a :: [Either a b]) :: ([a], [b]) where ...
- type family IsLeft (a :: Either a b) :: Bool where ...
- type family IsRight (a :: Either a b) :: Bool where ...
- data LeftSym0 l
- type LeftSym1 t = Left t
- data RightSym0 l
- type RightSym1 t = Right t
- data Either_Sym0 l
- data Either_Sym1 l l
- data Either_Sym2 l l l
- type Either_Sym3 t t t = Either_ t t t
- data LeftsSym0 l
- type LeftsSym1 t = Lefts t
- data RightsSym0 l
- type RightsSym1 t = Rights t
- data IsLeftSym0 l
- type IsLeftSym1 t = IsLeft t
- data IsRightSym0 l
- type IsRightSym1 t = IsRight t
Promoted functions from Data.Either
type family Either_ (a :: TyFun a c -> Type) (a :: TyFun b c -> Type) (a :: Either a b) :: c where ... #
The preceding two definitions are derived from the function either in
Data.Either. The extra underscore is to avoid name clashes with the type
Either.
type family PartitionEithers (a :: [Either a b]) :: ([a], [b]) where ... #
Equations
| PartitionEithers a_6989586621679668974 = Apply (Apply (Apply FoldrSym0 (Apply (Apply Either_Sym0 (Let6989586621679668981LeftSym1 a_6989586621679668974)) (Let6989586621679668981RightSym1 a_6989586621679668974))) (Apply (Apply Tuple2Sym0 '[]) '[])) a_6989586621679668974 |
Defunctionalization symbols
Instances
| SuppressUnusedWarnings (TyFun a6989586621679054100 (Either a6989586621679054100 b6989586621679054101) -> *) (LeftSym0 a6989586621679054100 b6989586621679054101) # | |
| type Apply a6989586621679054100 (Either a6989586621679054100 b6989586621679054101) (LeftSym0 a6989586621679054100 b6989586621679054101) l0 # | |
Instances
| SuppressUnusedWarnings (TyFun b6989586621679054101 (Either a6989586621679054100 b6989586621679054101) -> *) (RightSym0 a6989586621679054100 b6989586621679054101) # | |
| type Apply b6989586621679054101 (Either a6989586621679054100 b6989586621679054101) (RightSym0 a6989586621679054100 b6989586621679054101) l0 # | |
data Either_Sym0 l #
Instances
| SuppressUnusedWarnings (TyFun (TyFun a6989586621679667663 c6989586621679667664 -> Type) (TyFun (TyFun b6989586621679667665 c6989586621679667664 -> Type) (TyFun (Either a6989586621679667663 b6989586621679667665) c6989586621679667664 -> Type) -> Type) -> *) (Either_Sym0 a6989586621679667663 b6989586621679667665 c6989586621679667664) # | |
| type Apply (TyFun a6989586621679667663 c6989586621679667664 -> Type) (TyFun (TyFun b6989586621679667665 c6989586621679667664 -> Type) (TyFun (Either a6989586621679667663 b6989586621679667665) c6989586621679667664 -> Type) -> Type) (Either_Sym0 a6989586621679667663 b6989586621679667665 c6989586621679667664) l0 # | |
data Either_Sym1 l l #
Instances
| SuppressUnusedWarnings ((TyFun a6989586621679667663 c6989586621679667664 -> Type) -> TyFun (TyFun b6989586621679667665 c6989586621679667664 -> Type) (TyFun (Either a6989586621679667663 b6989586621679667665) c6989586621679667664 -> Type) -> *) (Either_Sym1 b6989586621679667665 a6989586621679667663 c6989586621679667664) # | |
| type Apply (TyFun b6989586621679667665 c6989586621679667664 -> Type) (TyFun (Either a6989586621679667663 b6989586621679667665) c6989586621679667664 -> Type) (Either_Sym1 b6989586621679667665 a6989586621679667663 c6989586621679667664 l0) l1 # | |
data Either_Sym2 l l l #
Instances
| SuppressUnusedWarnings ((TyFun a6989586621679667663 c6989586621679667664 -> Type) -> (TyFun b6989586621679667665 c6989586621679667664 -> Type) -> TyFun (Either a6989586621679667663 b6989586621679667665) c6989586621679667664 -> *) (Either_Sym2 b6989586621679667665 a6989586621679667663 c6989586621679667664) # | |
| type Apply (Either a6989586621679667663 b6989586621679667665) c6989586621679667664 (Either_Sym2 b6989586621679667665 a6989586621679667663 c6989586621679667664 l1 l0) l2 # | |
type Either_Sym3 t t t = Either_ t t t #
Instances
| SuppressUnusedWarnings (TyFun [Either a6989586621679668933 b6989586621679668934] [a6989586621679668933] -> *) (LeftsSym0 b6989586621679668934 a6989586621679668933) # | |
| type Apply [Either a6989586621679668933 b6989586621679668934] [a6989586621679668933] (LeftsSym0 b6989586621679668934 a6989586621679668933) l0 # | |
data RightsSym0 l #
Instances
| SuppressUnusedWarnings (TyFun [Either a6989586621679668931 b6989586621679668932] [b6989586621679668932] -> *) (RightsSym0 a6989586621679668931 b6989586621679668932) # | |
| type Apply [Either a6989586621679668931 b6989586621679668932] [b6989586621679668932] (RightsSym0 a6989586621679668931 b6989586621679668932) l0 # | |
type RightsSym1 t = Rights t #
data IsLeftSym0 l #
Instances
| SuppressUnusedWarnings (TyFun (Either a6989586621679668927 b6989586621679668928) Bool -> *) (IsLeftSym0 a6989586621679668927 b6989586621679668928) # | |
| type Apply (Either a6989586621679668927 b6989586621679668928) Bool (IsLeftSym0 a6989586621679668927 b6989586621679668928) l0 # | |
type IsLeftSym1 t = IsLeft t #
data IsRightSym0 l #
Instances
| SuppressUnusedWarnings (TyFun (Either a6989586621679668925 b6989586621679668926) Bool -> *) (IsRightSym0 a6989586621679668925 b6989586621679668926) # | |
| type Apply (Either a6989586621679668925 b6989586621679668926) Bool (IsRightSym0 a6989586621679668925 b6989586621679668926) l0 # | |
type IsRightSym1 t = IsRight t #