first-class-families-0.8.1.0: First-class type families
Safe HaskellSafe-Inferred
LanguageHaskell2010

Fcf.Data.Common

Description

Common data types: tuples, Either, Maybe.

Synopsis

Pairs

data Uncurry (d :: a -> b -> Exp c) (e :: (a, b)) (f :: c) Source #

Instances

Instances details
type Eval (Uncurry f '(x, y) :: a2 -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (Uncurry f '(x, y) :: a2 -> Type) = Eval (f x y)

data Fst (c :: (a, b)) (d :: a) Source #

Instances

Instances details
type Eval (Fst '(a2, _b) :: a1 -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (Fst '(a2, _b) :: a1 -> Type) = a2

data Snd (c :: (a, b)) (d :: b) Source #

Instances

Instances details
type Eval (Snd '(_a, b) :: a2 -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (Snd '(_a, b) :: a2 -> Type) = b

data ((a :: b -> Exp c) *** (d :: b' -> Exp c')) (e :: (b, b')) (f :: (c, c')) infixr 3 Source #

Specialization of Bimap for pairs.

Instances

Instances details
type Eval ((f *** f') '(b2, b'2) :: (k1, k2) -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval ((f *** f') '(b2, b'2) :: (k1, k2) -> Type) = '(Eval (f b2), Eval (f' b'2))

Either

data UnEither (d :: a -> Exp c) (e :: b -> Exp c) (f :: Either a b) (g :: c) Source #

Instances

Instances details
type Eval (UnEither f g ('Left x :: Either a1 b) :: a2 -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (UnEither f g ('Left x :: Either a1 b) :: a2 -> Type) = Eval (f x)
type Eval (UnEither f g ('Right y :: Either a1 b) :: a2 -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (UnEither f g ('Right y :: Either a1 b) :: a2 -> Type) = Eval (g y)

data IsLeft (c :: Either a b) (d :: Bool) Source #

Instances

Instances details
type Eval (IsLeft ('Left _a :: Either a b) :: Bool -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (IsLeft ('Left _a :: Either a b) :: Bool -> Type) = 'True
type Eval (IsLeft ('Right _a :: Either a b) :: Bool -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (IsLeft ('Right _a :: Either a b) :: Bool -> Type) = 'False

data IsRight (c :: Either a b) (d :: Bool) Source #

Instances

Instances details
type Eval (IsRight ('Left _a :: Either a b) :: Bool -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (IsRight ('Left _a :: Either a b) :: Bool -> Type) = 'False
type Eval (IsRight ('Right _a :: Either a b) :: Bool -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (IsRight ('Right _a :: Either a b) :: Bool -> Type) = 'True

Maybe

data UnMaybe (c :: Exp b) (d :: a -> Exp b) (e :: Maybe a) (f :: b) Source #

Instances

Instances details
type Eval (UnMaybe y f ('Just x) :: a1 -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (UnMaybe y f ('Just x) :: a1 -> Type) = Eval (f x)
type Eval (UnMaybe y f ('Nothing :: Maybe a2) :: a1 -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (UnMaybe y f ('Nothing :: Maybe a2) :: a1 -> Type) = Eval y

data FromMaybe (a :: k) (b :: Maybe k) (c :: k) Source #

Instances

Instances details
type Eval (FromMaybe _a ('Just b) :: a -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (FromMaybe _a ('Just b) :: a -> Type) = b
type Eval (FromMaybe a2 ('Nothing :: Maybe a1) :: a1 -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (FromMaybe a2 ('Nothing :: Maybe a1) :: a1 -> Type) = a2

data IsNothing (b :: Maybe a) (c :: Bool) Source #

Instances

Instances details
type Eval (IsNothing ('Just _a) :: Bool -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (IsNothing ('Just _a) :: Bool -> Type) = 'False
type Eval (IsNothing ('Nothing :: Maybe a) :: Bool -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (IsNothing ('Nothing :: Maybe a) :: Bool -> Type) = 'True

data IsJust (b :: Maybe a) (c :: Bool) Source #

Instances

Instances details
type Eval (IsJust ('Just _a) :: Bool -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (IsJust ('Just _a) :: Bool -> Type) = 'True
type Eval (IsJust ('Nothing :: Maybe a) :: Bool -> Type) Source # 
Instance details

Defined in Fcf.Data.Common

type Eval (IsJust ('Nothing :: Maybe a) :: Bool -> Type) = 'False