| 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.
Synopsis
- 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 a6989586621679083011 (Either a6989586621679083011 b6989586621679083012))
- type LeftSym1 (t :: a6989586621679083011) = Left t
- data RightSym0 (l :: TyFun b6989586621679083012 (Either a6989586621679083011 b6989586621679083012))
- type RightSym1 (t :: b6989586621679083012) = Right t
- data Either_Sym0 (l :: TyFun (TyFun a6989586621679939843 c6989586621679939844 -> Type) (TyFun (TyFun b6989586621679939845 c6989586621679939844 -> Type) (TyFun (Either a6989586621679939843 b6989586621679939845) c6989586621679939844 -> Type) -> Type))
- data Either_Sym1 (l :: TyFun a6989586621679939843 c6989586621679939844 -> Type) (l :: TyFun (TyFun b6989586621679939845 c6989586621679939844 -> Type) (TyFun (Either a6989586621679939843 b6989586621679939845) c6989586621679939844 -> Type))
- data Either_Sym2 (l :: TyFun a6989586621679939843 c6989586621679939844 -> Type) (l :: TyFun b6989586621679939845 c6989586621679939844 -> Type) (l :: TyFun (Either a6989586621679939843 b6989586621679939845) c6989586621679939844)
- type Either_Sym3 (t :: TyFun a6989586621679939843 c6989586621679939844 -> Type) (t :: TyFun b6989586621679939845 c6989586621679939844 -> Type) (t :: Either a6989586621679939843 b6989586621679939845) = Either_ t t t
- data LeftsSym0 (l :: TyFun [Either a6989586621679940979 b6989586621679940980] [a6989586621679940979])
- type LeftsSym1 (t :: [Either a6989586621679940979 b6989586621679940980]) = Lefts t
- data RightsSym0 (l :: TyFun [Either a6989586621679940977 b6989586621679940978] [b6989586621679940978])
- type RightsSym1 (t :: [Either a6989586621679940977 b6989586621679940978]) = Rights t
- data IsLeftSym0 (l :: TyFun (Either a6989586621679940973 b6989586621679940974) Bool)
- type IsLeftSym1 (t :: Either a6989586621679940973 b6989586621679940974) = IsLeft t
- data IsRightSym0 (l :: TyFun (Either a6989586621679940971 b6989586621679940972) Bool)
- type IsRightSym1 (t :: Either a6989586621679940971 b6989586621679940972) = 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_6989586621679941346 = Apply (Apply (Apply FoldrSym0 (Apply (Apply Either_Sym0 (Let6989586621679941353LeftSym1 a_6989586621679941346)) (Let6989586621679941353RightSym1 a_6989586621679941346))) (Apply (Apply Tuple2Sym0 '[]) '[])) a_6989586621679941346 |
Defunctionalization symbols
data LeftSym0 (l :: TyFun a6989586621679083011 (Either a6989586621679083011 b6989586621679083012)) #
Instances
| SuppressUnusedWarnings (LeftSym0 :: TyFun a6989586621679083011 (Either a6989586621679083011 b6989586621679083012) -> *) # | |
Defined in Data.Singletons.Prelude.Instances Methods suppressUnusedWarnings :: () # | |
| type Apply (LeftSym0 :: TyFun a (Either a b6989586621679083012) -> *) (l :: a) # | |
data RightSym0 (l :: TyFun b6989586621679083012 (Either a6989586621679083011 b6989586621679083012)) #
Instances
| SuppressUnusedWarnings (RightSym0 :: TyFun b6989586621679083012 (Either a6989586621679083011 b6989586621679083012) -> *) # | |
Defined in Data.Singletons.Prelude.Instances Methods suppressUnusedWarnings :: () # | |
| type Apply (RightSym0 :: TyFun b (Either a6989586621679083011 b) -> *) (l :: b) # | |
data Either_Sym0 (l :: TyFun (TyFun a6989586621679939843 c6989586621679939844 -> Type) (TyFun (TyFun b6989586621679939845 c6989586621679939844 -> Type) (TyFun (Either a6989586621679939843 b6989586621679939845) c6989586621679939844 -> Type) -> Type)) #
Instances
| SuppressUnusedWarnings (Either_Sym0 :: TyFun (TyFun a6989586621679939843 c6989586621679939844 -> Type) (TyFun (TyFun b6989586621679939845 c6989586621679939844 -> Type) (TyFun (Either a6989586621679939843 b6989586621679939845) c6989586621679939844 -> Type) -> Type) -> *) # | |
Defined in Data.Singletons.Prelude.Either Methods suppressUnusedWarnings :: () # | |
| type Apply (Either_Sym0 :: TyFun (TyFun a6989586621679939843 c6989586621679939844 -> Type) (TyFun (TyFun b6989586621679939845 c6989586621679939844 -> Type) (TyFun (Either a6989586621679939843 b6989586621679939845) c6989586621679939844 -> Type) -> Type) -> *) (l :: TyFun a6989586621679939843 c6989586621679939844 -> Type) # | |
Defined in Data.Singletons.Prelude.Either type Apply (Either_Sym0 :: TyFun (TyFun a6989586621679939843 c6989586621679939844 -> Type) (TyFun (TyFun b6989586621679939845 c6989586621679939844 -> Type) (TyFun (Either a6989586621679939843 b6989586621679939845) c6989586621679939844 -> Type) -> Type) -> *) (l :: TyFun a6989586621679939843 c6989586621679939844 -> Type) = (Either_Sym1 l :: TyFun (TyFun b6989586621679939845 c6989586621679939844 -> Type) (TyFun (Either a6989586621679939843 b6989586621679939845) c6989586621679939844 -> Type) -> *) | |
data Either_Sym1 (l :: TyFun a6989586621679939843 c6989586621679939844 -> Type) (l :: TyFun (TyFun b6989586621679939845 c6989586621679939844 -> Type) (TyFun (Either a6989586621679939843 b6989586621679939845) c6989586621679939844 -> Type)) #
Instances
| SuppressUnusedWarnings (Either_Sym1 :: (TyFun a6989586621679939843 c6989586621679939844 -> Type) -> TyFun (TyFun b6989586621679939845 c6989586621679939844 -> Type) (TyFun (Either a6989586621679939843 b6989586621679939845) c6989586621679939844 -> Type) -> *) # | |
Defined in Data.Singletons.Prelude.Either Methods suppressUnusedWarnings :: () # | |
| type Apply (Either_Sym1 l1 :: TyFun (TyFun b6989586621679939845 c6989586621679939844 -> Type) (TyFun (Either a6989586621679939843 b6989586621679939845) c6989586621679939844 -> Type) -> *) (l2 :: TyFun b6989586621679939845 c6989586621679939844 -> Type) # | |
Defined in Data.Singletons.Prelude.Either | |
data Either_Sym2 (l :: TyFun a6989586621679939843 c6989586621679939844 -> Type) (l :: TyFun b6989586621679939845 c6989586621679939844 -> Type) (l :: TyFun (Either a6989586621679939843 b6989586621679939845) c6989586621679939844) #
Instances
| SuppressUnusedWarnings (Either_Sym2 :: (TyFun a6989586621679939843 c6989586621679939844 -> Type) -> (TyFun b6989586621679939845 c6989586621679939844 -> Type) -> TyFun (Either a6989586621679939843 b6989586621679939845) c6989586621679939844 -> *) # | |
Defined in Data.Singletons.Prelude.Either Methods suppressUnusedWarnings :: () # | |
| type Apply (Either_Sym2 l1 l2 :: TyFun (Either a b) c -> *) (l3 :: Either a b) # | |
Defined in Data.Singletons.Prelude.Either | |
type Either_Sym3 (t :: TyFun a6989586621679939843 c6989586621679939844 -> Type) (t :: TyFun b6989586621679939845 c6989586621679939844 -> Type) (t :: Either a6989586621679939843 b6989586621679939845) = Either_ t t t #
data LeftsSym0 (l :: TyFun [Either a6989586621679940979 b6989586621679940980] [a6989586621679940979]) #
data RightsSym0 (l :: TyFun [Either a6989586621679940977 b6989586621679940978] [b6989586621679940978]) #
Instances
| SuppressUnusedWarnings (RightsSym0 :: TyFun [Either a6989586621679940977 b6989586621679940978] [b6989586621679940978] -> *) # | |
Defined in Data.Singletons.Prelude.Either Methods suppressUnusedWarnings :: () # | |
| type Apply (RightsSym0 :: TyFun [Either a b] [b] -> *) (l :: [Either a b]) # | |
Defined in Data.Singletons.Prelude.Either | |
type RightsSym1 (t :: [Either a6989586621679940977 b6989586621679940978]) = Rights t #
data IsLeftSym0 (l :: TyFun (Either a6989586621679940973 b6989586621679940974) Bool) #
Instances
| SuppressUnusedWarnings (IsLeftSym0 :: TyFun (Either a6989586621679940973 b6989586621679940974) Bool -> *) # | |
Defined in Data.Singletons.Prelude.Either Methods suppressUnusedWarnings :: () # | |
| type Apply (IsLeftSym0 :: TyFun (Either a b) Bool -> *) (l :: Either a b) # | |
Defined in Data.Singletons.Prelude.Either | |
type IsLeftSym1 (t :: Either a6989586621679940973 b6989586621679940974) = IsLeft t #
data IsRightSym0 (l :: TyFun (Either a6989586621679940971 b6989586621679940972) Bool) #
Instances
| SuppressUnusedWarnings (IsRightSym0 :: TyFun (Either a6989586621679940971 b6989586621679940972) Bool -> *) # | |
Defined in Data.Singletons.Prelude.Either Methods suppressUnusedWarnings :: () # | |
| type Apply (IsRightSym0 :: TyFun (Either a b) Bool -> *) (l :: Either a b) # | |
Defined in Data.Singletons.Prelude.Either | |
type IsRightSym1 (t :: Either a6989586621679940971 b6989586621679940972) = IsRight t #