singleraeh-0.4.0: raehik's singletons
Safe HaskellSafe-Inferred
LanguageGHC2021

Singleraeh.Tuple

Documentation

data SUnit (unit :: ()) where Source #

Constructors

SUnit :: SUnit '() 

Instances

Instances details
Demotable SUnit Source # 
Instance details

Defined in Singleraeh.Tuple

Associated Types

type Demote SUnit Source #

Methods

demote :: forall (k1 :: k). SUnit k1 -> Demote SUnit Source #

type Demote SUnit Source # 
Instance details

Defined in Singleraeh.Tuple

type Demote SUnit = ()

demoteSUnit :: SUnit unit -> () Source #

data STuple2 sa sb ab where Source #

Constructors

STuple2 :: sa a -> sb b -> STuple2 sa sb '(a, b) 

Instances

Instances details
(Demotable sa, Demotable sb) => Demotable (STuple2 sa sb :: (a, b) -> Type) Source # 
Instance details

Defined in Singleraeh.Tuple

Associated Types

type Demote (STuple2 sa sb) Source #

Methods

demote :: forall (k1 :: k). STuple2 sa sb k1 -> Demote (STuple2 sa sb) Source #

type Demote (STuple2 sa sb :: (a, b) -> Type) Source # 
Instance details

Defined in Singleraeh.Tuple

type Demote (STuple2 sa sb :: (a, b) -> Type) = (Demote sa, Demote sb)

demoteSTuple2 :: forall da db sa sb ab. (forall a. sa a -> da) -> (forall b. sb b -> db) -> STuple2 sa sb ab -> (da, db) Source #

class SingTuple2 (cl :: lk -> Constraint) (cr :: rk -> Constraint) (sl :: lk -> Type) (sr :: rk -> Type) (lr :: (lk, rk)) where Source #

Methods

singTuple2' :: (forall l. cl l => sl l) -> (forall r. cr r => sr r) -> STuple2 sl sr lr Source #

Instances

Instances details
(cl l, cr r) => SingTuple2 (cl :: k1 -> Constraint) (cr :: k2 -> Constraint) (sl :: k1 -> Type) (sr :: k2 -> Type) ('(l, r) :: (k1, k2)) Source # 
Instance details

Defined in Singleraeh.Tuple

Methods

singTuple2' :: (forall (l0 :: lk). cl l0 => sl l0) -> (forall (r0 :: rk). cr r0 => sr r0) -> STuple2 sl sr '(l, r) Source #

singTuple2 :: forall cl cr sl sr lr. SingTuple2 cl cr sl sr lr => (forall l. cl l => sl l) -> (forall r. cr r => sr r) -> STuple2 sl sr lr Source #

data STuple3 sa sb sc abc where Source #

Constructors

STuple3 :: sa a -> sb b -> sc c -> STuple3 sa sb sc '(a, b, c) 

Instances

Instances details
(Demotable sa, Demotable sb, Demotable sc) => Demotable (STuple3 sa sb sc :: (a, b, c) -> Type) Source # 
Instance details

Defined in Singleraeh.Tuple

Associated Types

type Demote (STuple3 sa sb sc) Source #

Methods

demote :: forall (k1 :: k). STuple3 sa sb sc k1 -> Demote (STuple3 sa sb sc) Source #

type Demote (STuple3 sa sb sc :: (a, b, c) -> Type) Source # 
Instance details

Defined in Singleraeh.Tuple

type Demote (STuple3 sa sb sc :: (a, b, c) -> Type) = (Demote sa, Demote sb, Demote sc)

demoteSTuple3 :: forall da db dc sa sb sc abc. (forall a. sa a -> da) -> (forall b. sb b -> db) -> (forall c. sc c -> dc) -> STuple3 sa sb sc abc -> (da, db, dc) Source #

class SingTuple3 (ca :: ak -> Constraint) (cb :: bk -> Constraint) (cc :: ck -> Constraint) (sa :: ak -> Type) (sb :: bk -> Type) (sc :: ck -> Type) (abc :: (ak, bk, ck)) where Source #

Methods

singTuple3' :: (forall a. ca a => sa a) -> (forall b. cb b => sb b) -> (forall c. cc c => sc c) -> STuple3 sa sb sc abc Source #

Instances

Instances details
(ca a, cb b, cc c) => SingTuple3 (ca :: k1 -> Constraint) (cb :: k2 -> Constraint) (cc :: k3 -> Constraint) (sa :: k1 -> Type) (sb :: k2 -> Type) (sc :: k3 -> Type) ('(a, b, c) :: (k1, k2, k3)) Source # 
Instance details

Defined in Singleraeh.Tuple

Methods

singTuple3' :: (forall (a0 :: ak). ca a0 => sa a0) -> (forall (b0 :: bk). cb b0 => sb b0) -> (forall (c0 :: ck). cc c0 => sc c0) -> STuple3 sa sb sc '(a, b, c) Source #

singTuple3 :: forall ca cb cc sa sb sc abc. SingTuple3 ca cb cc sa sb sc abc => (forall a. ca a => sa a) -> (forall b. cb b => sb b) -> (forall c. cc c => sc c) -> STuple3 sa sb sc abc Source #