| 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_ :: (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 :: TyFun a6989586621679075946 (Either a6989586621679075946 b6989586621679075947))
- type LeftSym1 (t :: a6989586621679075946) = Left t
- data RightSym0 (l :: TyFun b6989586621679075947 (Either a6989586621679075946 b6989586621679075947))
- type RightSym1 (t :: b6989586621679075947) = Right t
- data Either_Sym0 (l :: TyFun (TyFun a6989586621679453497 c6989586621679453498 -> Type) (TyFun (TyFun b6989586621679453499 c6989586621679453498 -> Type) (TyFun (Either a6989586621679453497 b6989586621679453499) c6989586621679453498 -> Type) -> Type))
- data Either_Sym1 (l :: TyFun a6989586621679453497 c6989586621679453498 -> Type) (l :: TyFun (TyFun b6989586621679453499 c6989586621679453498 -> Type) (TyFun (Either a6989586621679453497 b6989586621679453499) c6989586621679453498 -> Type))
- data Either_Sym2 (l :: TyFun a6989586621679453497 c6989586621679453498 -> Type) (l :: TyFun b6989586621679453499 c6989586621679453498 -> Type) (l :: TyFun (Either a6989586621679453497 b6989586621679453499) c6989586621679453498)
- type Either_Sym3 (t :: TyFun a6989586621679453497 c6989586621679453498 -> Type) (t :: TyFun b6989586621679453499 c6989586621679453498 -> Type) (t :: Either a6989586621679453497 b6989586621679453499) = Either_ t t t
- data LeftsSym0 (l :: TyFun [Either a6989586621679454609 b6989586621679454610] [a6989586621679454609])
- type LeftsSym1 (t :: [Either a6989586621679454609 b6989586621679454610]) = Lefts t
- data RightsSym0 (l :: TyFun [Either a6989586621679454607 b6989586621679454608] [b6989586621679454608])
- type RightsSym1 (t :: [Either a6989586621679454607 b6989586621679454608]) = Rights t
- data IsLeftSym0 (l :: TyFun (Either a6989586621679454603 b6989586621679454604) Bool)
- type IsLeftSym1 (t :: Either a6989586621679454603 b6989586621679454604) = IsLeft t
- data IsRightSym0 (l :: TyFun (Either a6989586621679454601 b6989586621679454602) Bool)
- type IsRightSym1 (t :: Either a6989586621679454601 b6989586621679454602) = 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_6989586621679454650 = Apply (Apply (Apply FoldrSym0 (Apply (Apply Either_Sym0 (Let6989586621679454657LeftSym1 a_6989586621679454650)) (Let6989586621679454657RightSym1 a_6989586621679454650))) (Apply (Apply Tuple2Sym0 '[]) '[])) a_6989586621679454650 |
Defunctionalization symbols
data LeftSym0 (l :: TyFun a6989586621679075946 (Either a6989586621679075946 b6989586621679075947)) #
data RightSym0 (l :: TyFun b6989586621679075947 (Either a6989586621679075946 b6989586621679075947)) #
data Either_Sym0 (l :: TyFun (TyFun a6989586621679453497 c6989586621679453498 -> Type) (TyFun (TyFun b6989586621679453499 c6989586621679453498 -> Type) (TyFun (Either a6989586621679453497 b6989586621679453499) c6989586621679453498 -> Type) -> Type)) #
Instances
| SuppressUnusedWarnings (TyFun (TyFun a6989586621679453497 c6989586621679453498 -> Type) (TyFun (TyFun b6989586621679453499 c6989586621679453498 -> Type) (TyFun (Either a6989586621679453497 b6989586621679453499) c6989586621679453498 -> Type) -> Type) -> *) (Either_Sym0 a6989586621679453497 b6989586621679453499 c6989586621679453498) # | |
| type Apply (TyFun a6989586621679453497 c6989586621679453498 -> Type) (TyFun (TyFun b6989586621679453499 c6989586621679453498 -> Type) (TyFun (Either a6989586621679453497 b6989586621679453499) c6989586621679453498 -> Type) -> Type) (Either_Sym0 a6989586621679453497 b6989586621679453499 c6989586621679453498) l # | |
data Either_Sym1 (l :: TyFun a6989586621679453497 c6989586621679453498 -> Type) (l :: TyFun (TyFun b6989586621679453499 c6989586621679453498 -> Type) (TyFun (Either a6989586621679453497 b6989586621679453499) c6989586621679453498 -> Type)) #
Instances
| SuppressUnusedWarnings ((TyFun a6989586621679453497 c6989586621679453498 -> Type) -> TyFun (TyFun b6989586621679453499 c6989586621679453498 -> Type) (TyFun (Either a6989586621679453497 b6989586621679453499) c6989586621679453498 -> Type) -> *) (Either_Sym1 a6989586621679453497 b6989586621679453499 c6989586621679453498) # | |
| type Apply (TyFun b6989586621679453499 c6989586621679453498 -> Type) (TyFun (Either a6989586621679453497 b6989586621679453499) c6989586621679453498 -> Type) (Either_Sym1 a6989586621679453497 b6989586621679453499 c6989586621679453498 l1) l2 # | |
data Either_Sym2 (l :: TyFun a6989586621679453497 c6989586621679453498 -> Type) (l :: TyFun b6989586621679453499 c6989586621679453498 -> Type) (l :: TyFun (Either a6989586621679453497 b6989586621679453499) c6989586621679453498) #
Instances
| SuppressUnusedWarnings ((TyFun a6989586621679453497 c6989586621679453498 -> Type) -> (TyFun b6989586621679453499 c6989586621679453498 -> Type) -> TyFun (Either a6989586621679453497 b6989586621679453499) c6989586621679453498 -> *) (Either_Sym2 a6989586621679453497 b6989586621679453499 c6989586621679453498) # | |
| type Apply (Either a b) c (Either_Sym2 a b c l1 l2) l3 # | |
type Either_Sym3 (t :: TyFun a6989586621679453497 c6989586621679453498 -> Type) (t :: TyFun b6989586621679453499 c6989586621679453498 -> Type) (t :: Either a6989586621679453497 b6989586621679453499) = Either_ t t t #
data LeftsSym0 (l :: TyFun [Either a6989586621679454609 b6989586621679454610] [a6989586621679454609]) #
data RightsSym0 (l :: TyFun [Either a6989586621679454607 b6989586621679454608] [b6989586621679454608]) #
Instances
| SuppressUnusedWarnings (TyFun [Either a6989586621679454607 b6989586621679454608] [b6989586621679454608] -> *) (RightsSym0 a6989586621679454607 b6989586621679454608) # | |
| type Apply [Either a b] [b] (RightsSym0 a b) l # | |
type RightsSym1 (t :: [Either a6989586621679454607 b6989586621679454608]) = Rights t #
data IsLeftSym0 (l :: TyFun (Either a6989586621679454603 b6989586621679454604) Bool) #
Instances
| SuppressUnusedWarnings (TyFun (Either a6989586621679454603 b6989586621679454604) Bool -> *) (IsLeftSym0 a6989586621679454603 b6989586621679454604) # | |
| type Apply (Either a b) Bool (IsLeftSym0 a b) l # | |
type IsLeftSym1 (t :: Either a6989586621679454603 b6989586621679454604) = IsLeft t #
data IsRightSym0 (l :: TyFun (Either a6989586621679454601 b6989586621679454602) Bool) #
Instances
| SuppressUnusedWarnings (TyFun (Either a6989586621679454601 b6989586621679454602) Bool -> *) (IsRightSym0 a6989586621679454601 b6989586621679454602) # | |
| type Apply (Either a b) Bool (IsRightSym0 a b) l # | |
type IsRightSym1 (t :: Either a6989586621679454601 b6989586621679454602) = IsRight t #