generics-sop-0.5.1.4: Generic Programming using True Sums of Products
Safe HaskellNone
LanguageHaskell2010

Generics.SOP.Constraint

Documentation

class (AllF c xs, SListI xs) => All (c :: k -> Constraint) (xs :: [k]) where #

Methods

cpara_SList :: proxy c -> r ('[] :: [k]) -> (forall (y :: k) (ys :: [k]). (c y, All c ys) => r ys -> r (y ': ys)) -> r xs #

Instances

Instances details
All (c :: k -> Constraint) ('[] :: [k]) 
Instance details

Defined in Data.SOP.Constraint

Methods

cpara_SList :: proxy c -> r ('[] :: [k]) -> (forall (y :: k) (ys :: [k]). (c y, All c ys) => r ys -> r (y ': ys)) -> r ('[] :: [k]) #

(c x, All c xs) => All (c :: a -> Constraint) (x ': xs :: [a]) 
Instance details

Defined in Data.SOP.Constraint

Methods

cpara_SList :: proxy c -> r ('[] :: [a]) -> (forall (y :: a) (ys :: [a]). (c y, All c ys) => r ys -> r (y ': ys)) -> r (x ': xs) #

type All2 (c :: k -> Constraint) = All (All c) #

ccase_SList :: forall {a} c (xs :: [a]) proxy r. All c xs => proxy c -> r ('[] :: [a]) -> (forall (y :: a) (ys :: [a]). (c y, All c ys) => r (y ': ys)) -> r xs #

class (SListI xs, SListI ys, SameShapeAs xs ys, SameShapeAs ys xs, AllZipF c xs ys) => AllZip (c :: a -> b -> Constraint) (xs :: [a]) (ys :: [b]) #

Instances

Instances details
(SListI xs, SListI ys, SameShapeAs xs ys, SameShapeAs ys xs, AllZipF c xs ys) => AllZip (c :: a -> b -> Constraint) (xs :: [a]) (ys :: [b]) 
Instance details

Defined in Data.SOP.Constraint

class (AllZipF (AllZip f) xss yss, SListI xss, SListI yss, SameShapeAs xss yss, SameShapeAs yss xss) => AllZip2 (f :: a -> b -> Constraint) (xss :: [[a]]) (yss :: [[b]]) #

Instances

Instances details
(AllZipF (AllZip f) xss yss, SListI xss, SListI yss, SameShapeAs xss yss, SameShapeAs yss xss) => AllZip2 (f :: a -> b -> Constraint) (xss :: [[a]]) (yss :: [[b]]) 
Instance details

Defined in Data.SOP.Constraint

type family AllN (h :: (k -> Type) -> l -> Type) (c :: k -> Constraint) :: l -> Constraint #

Instances

Instances details
type AllN (POP :: (k -> Type) -> [[k]] -> Type) (c :: k -> Constraint) 
Instance details

Defined in Data.SOP.NP

type AllN (POP :: (k -> Type) -> [[k]] -> Type) (c :: k -> Constraint) = All2 c
type AllN (SOP :: (k -> Type) -> [[k]] -> Type) (c :: k -> Constraint) 
Instance details

Defined in Data.SOP.NS

type AllN (SOP :: (k -> Type) -> [[k]] -> Type) (c :: k -> Constraint) = All2 c
type AllN (NP :: (k -> Type) -> [k] -> Type) (c :: k -> Constraint) 
Instance details

Defined in Data.SOP.NP

type AllN (NP :: (k -> Type) -> [k] -> Type) (c :: k -> Constraint) = All c
type AllN (NS :: (k -> Type) -> [k] -> Type) (c :: k -> Constraint) 
Instance details

Defined in Data.SOP.NS

type AllN (NS :: (k -> Type) -> [k] -> Type) (c :: k -> Constraint) = All c

type family AllZipN (h :: (k -> Type) -> l -> Type) (c :: k1 -> k2 -> Constraint) :: l1 -> l2 -> Constraint #

Instances

Instances details
type AllZipN (POP :: (k -> Type) -> [[k]] -> Type) (c :: a -> b -> Constraint) 
Instance details

Defined in Data.SOP.NP

type AllZipN (POP :: (k -> Type) -> [[k]] -> Type) (c :: a -> b -> Constraint) = AllZip2 c
type AllZipN (NP :: (k -> Type) -> [k] -> Type) (c :: a -> b -> Constraint) 
Instance details

Defined in Data.SOP.NP

type AllZipN (NP :: (k -> Type) -> [k] -> Type) (c :: a -> b -> Constraint) = AllZip c

class f (g x) => Compose (f :: k -> Constraint) (g :: k1 -> k) (x :: k1) #

Instances

Instances details
f (g x) => Compose (f :: k1 -> Constraint) (g :: k2 -> k1) (x :: k2) 
Instance details

Defined in Data.SOP.Constraint

class (f x, g x) => And (f :: k -> Constraint) (g :: k -> Constraint) (x :: k) #

Instances

Instances details
(f x, g x) => And (f :: k -> Constraint) (g :: k -> Constraint) (x :: k) 
Instance details

Defined in Data.SOP.Constraint

class Top (x :: k) #

Instances

Instances details
Top (x :: k) 
Instance details

Defined in Data.SOP.Constraint

class Coercible (f x) (g y) => LiftedCoercible (f :: k -> k1) (g :: k2 -> k1) (x :: k) (y :: k2) #

Instances

Instances details
Coercible (f x) (g y) => LiftedCoercible (f :: k1 -> k2) (g :: k3 -> k2) (x :: k1) (y :: k3) 
Instance details

Defined in Data.SOP.Constraint

type family SameShapeAs (xs :: [a]) (ys :: [b]) where ... #

Equations

SameShapeAs ('[] :: [a]) (ys :: [b]) = ys ~ ('[] :: [b]) 
SameShapeAs (x ': xs :: [a1]) (ys :: [a2]) = ys ~ (Head ys ': Tail ys) 

type SListI = All (Top :: k -> Constraint) #

type SListI2 = All (SListI :: [k] -> Constraint) #

type Constraint = CONSTRAINT LiftedRep #

type family SListIN (h :: (k -> Type) -> l -> Type) :: l -> Constraint #

Instances

Instances details
type SListIN (POP :: (k -> Type) -> [[k]] -> Type) 
Instance details

Defined in Data.SOP.NP

type SListIN (POP :: (k -> Type) -> [[k]] -> Type) = SListI2 :: [[k]] -> Constraint
type SListIN (SOP :: (k -> Type) -> [[k]] -> Type) 
Instance details

Defined in Data.SOP.NS

type SListIN (SOP :: (k -> Type) -> [[k]] -> Type) = SListI2 :: [[k]] -> Constraint
type SListIN (NP :: (k -> Type) -> [k] -> Type) 
Instance details

Defined in Data.SOP.NP

type SListIN (NP :: (k -> Type) -> [k] -> Type) = SListI :: [k] -> Constraint
type SListIN (NS :: (k -> Type) -> [k] -> Type) 
Instance details

Defined in Data.SOP.NS

type SListIN (NS :: (k -> Type) -> [k] -> Type) = SListI :: [k] -> Constraint

type family AllF (c :: k -> Constraint) (xs :: [k]) where ... #

Equations

AllF (_c :: k -> Constraint) ('[] :: [k]) = () 
AllF (c :: k -> Constraint) (x ': xs :: [k]) = (c x, All c xs) 

type family AllZipF (c :: a -> b -> Constraint) (xs :: [a]) (ys :: [b]) where ... #

Equations

AllZipF (_c :: a -> b -> Constraint) ('[] :: [a]) ('[] :: [b]) = () 
AllZipF (c :: a -> b -> Constraint) (x ': xs :: [a]) (y ': ys :: [b]) = (c x y, AllZip c xs ys) 

type family Head (xs :: [a]) :: a where ... #

Equations

Head (x ': xs :: [a]) = x 

type family Tail (xs :: [a]) :: [a] where ... #

Equations

Tail (x ': xs :: [a]) = xs