heftia-0.1.0.0: Higher-order version of Freer.
Copyright(c) 2023 Yamada Ryo
LicenseMPL-2.0 (see the file LICENSE)
Maintainerymdfield@outlook.jp
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Hefty.Extensible

Description

An implementation of an open union for higher-order effects using the extensible package as a backend.

Synopsis

Documentation

newtype ExtensibleUnionH hs f a Source #

An implementation of an open union for higher-order effects using the extensible package as a backend.

Constructors

ExtensibleUnionH 

Fields

Instances

Instances details
UnionH ExtensibleUnionH Source # 
Instance details

Defined in Data.Hefty.Extensible

Associated Types

type HasMembershipH ExtensibleUnionH h hs Source #

Methods

injectH :: forall (h :: Signature) (hs :: [Signature]) (f :: Type -> Type). HasMembershipH ExtensibleUnionH h hs => h f ~> ExtensibleUnionH hs f Source #

projectH :: forall h (hs :: [Signature]) (f :: Type -> Type) a. HasMembershipH ExtensibleUnionH h hs => ExtensibleUnionH hs f a -> Maybe (h f a) Source #

absurdUnionH :: forall (f :: Type -> Type) a x. ExtensibleUnionH '[] f a -> x Source #

compH :: forall h (f :: Type -> Type) a (hs :: [Signature]). Either (h f a) (ExtensibleUnionH hs f a) -> ExtensibleUnionH (h ': hs) f a Source #

decompH :: forall h (hs :: [Signature]) (f :: Type -> Type) a. ExtensibleUnionH (h ': hs) f a -> Either (h f a) (ExtensibleUnionH hs f a) Source #

(|+:) :: forall h (f :: Type -> Type) a r (hs :: [Signature]). (h f a -> r) -> (ExtensibleUnionH hs f a -> r) -> ExtensibleUnionH (h ': hs) f a -> r Source #

inject0H :: forall (h :: (Type -> Type) -> Type -> Type) (f :: Type -> Type) (hs :: [(Type -> Type) -> Type -> Type]). h f ~> ExtensibleUnionH (h ': hs) f Source #

injectUnderH :: forall (h2 :: (Type -> Type) -> Type -> Type) (f :: Type -> Type) (h1 :: (Type -> Type) -> Type -> Type) (hs :: [(Type -> Type) -> Type -> Type]). h2 f ~> ExtensibleUnionH (h1 ': (h2 ': hs)) f Source #

injectUnder2H :: forall (h3 :: (Type -> Type) -> Type -> Type) (f :: Type -> Type) (h1 :: (Type -> Type) -> Type -> Type) (h2 :: (Type -> Type) -> Type -> Type) (hs :: [(Type -> Type) -> Type -> Type]). h3 f ~> ExtensibleUnionH (h1 ': (h2 ': (h3 ': hs))) f Source #

injectUnder3H :: forall (h4 :: (Type -> Type) -> Type -> Type) (f :: Type -> Type) (h1 :: (Type -> Type) -> Type -> Type) (h2 :: (Type -> Type) -> Type -> Type) (h3 :: (Type -> Type) -> Type -> Type) (hs :: [(Type -> Type) -> Type -> Type]). h4 f ~> ExtensibleUnionH (h1 ': (h2 ': (h3 ': (h4 ': hs)))) f Source #

weakenH :: forall (hs :: [Signature]) (f :: Type -> Type) (h :: Signature). ExtensibleUnionH hs f ~> ExtensibleUnionH (h ': hs) f Source #

weaken2H :: forall (hs :: [Signature]) (f :: Type -> Type) (h1 :: Signature) (h2 :: Signature). ExtensibleUnionH hs f ~> ExtensibleUnionH (h1 ': (h2 ': hs)) f Source #

weaken3H :: forall (hs :: [Signature]) (f :: Type -> Type) (h1 :: Signature) (h2 :: Signature) (h3 :: Signature). ExtensibleUnionH hs f ~> ExtensibleUnionH (h1 ': (h2 ': (h3 ': hs))) f Source #

weaken4H :: forall (hs :: [Signature]) (f :: Type -> Type) (h1 :: Signature) (h2 :: Signature) (h3 :: Signature) (h4 :: Signature). ExtensibleUnionH hs f ~> ExtensibleUnionH (h1 ': (h2 ': (h3 ': (h4 ': hs)))) f Source #

weakenUnderH :: forall (h1 :: Signature) (hs :: [Signature]) (f :: Type -> Type) (h2 :: Signature). ExtensibleUnionH (h1 ': hs) f ~> ExtensibleUnionH (h1 ': (h2 ': hs)) f Source #

weakenUnder2H :: forall (h1 :: Signature) (h2 :: Signature) (hs :: [Signature]) (f :: Type -> Type) (h3 :: Signature). ExtensibleUnionH (h1 ': (h2 ': hs)) f ~> ExtensibleUnionH (h1 ': (h2 ': (h3 ': hs))) f Source #

weakenUnder3H :: forall (h1 :: Signature) (h2 :: Signature) (h3 :: Signature) (hs :: [Signature]) (f :: Type -> Type) (h4 :: Signature). ExtensibleUnionH (h1 ': (h2 ': (h3 ': hs))) f ~> ExtensibleUnionH (h1 ': (h2 ': (h3 ': (h4 ': hs)))) f Source #

weaken2UnderH :: forall (h1 :: Signature) (hs :: [Signature]) (f :: Type -> Type) (h2 :: Signature) (h3 :: Signature). ExtensibleUnionH (h1 ': hs) f ~> ExtensibleUnionH (h1 ': (h2 ': (h3 ': hs))) f Source #

weaken2Under2H :: forall (h1 :: Signature) (h2 :: Signature) (hs :: [Signature]) (f :: Type -> Type) (h3 :: Signature) (h4 :: Signature). ExtensibleUnionH (h1 ': (h2 ': hs)) f ~> ExtensibleUnionH (h1 ': (h2 ': (h3 ': (h4 ': hs)))) f Source #

weaken3UnderH :: forall (h1 :: Signature) (hs :: [Signature]) (f :: Type -> Type) (h2 :: Signature) (h3 :: Signature) (h4 :: Signature). ExtensibleUnionH (h1 ': hs) f ~> ExtensibleUnionH (h1 ': (h2 ': (h3 ': (h4 ': hs)))) f Source #

flipUnionH :: forall (h1 :: Signature) (h2 :: Signature) (hs :: [Signature]) (f :: Type -> Type). ExtensibleUnionH (h1 ': (h2 ': hs)) f ~> ExtensibleUnionH (h2 ': (h1 ': hs)) f Source #

flipUnion3H :: forall (h1 :: Signature) (h2 :: Signature) (h3 :: Signature) (hs :: [Signature]) (f :: Type -> Type). ExtensibleUnionH (h1 ': (h2 ': (h3 ': hs))) f ~> ExtensibleUnionH (h3 ': (h2 ': (h1 ': hs))) f Source #

flipUnionUnderH :: forall (h1 :: Signature) (h2 :: Signature) (h3 :: Signature) (hs :: [Signature]) (f :: Type -> Type). ExtensibleUnionH (h1 ': (h2 ': (h3 ': hs))) f ~> ExtensibleUnionH (h1 ': (h3 ': (h2 ': hs))) f Source #

rot3H :: forall (h1 :: Signature) (h2 :: Signature) (h3 :: Signature) (hs :: [Signature]) (f :: Type -> Type). ExtensibleUnionH (h1 ': (h2 ': (h3 ': hs))) f ~> ExtensibleUnionH (h2 ': (h3 ': (h1 ': hs))) f Source #

rot3H' :: forall (h1 :: Signature) (h2 :: Signature) (h3 :: Signature) (hs :: [Signature]) (f :: Type -> Type). ExtensibleUnionH (h1 ': (h2 ': (h3 ': hs))) f ~> ExtensibleUnionH (h3 ': (h1 ': (h2 ': hs))) f Source #

bundleUnion2H :: forall (u' :: [Signature] -> Signature) (h1 :: Signature) (h2 :: Signature) (hs :: [Signature]) (f :: Type -> Type). UnionH u' => ExtensibleUnionH (h1 ': (h2 ': hs)) f ~> ExtensibleUnionH (u' '[h1, h2] ': hs) f Source #

bundleUnion3H :: forall (u' :: [Signature] -> Signature) (h1 :: Signature) (h2 :: Signature) (h3 :: Signature) (hs :: [Signature]) (f :: Type -> Type). UnionH u' => ExtensibleUnionH (h1 ': (h2 ': (h3 ': hs))) f ~> ExtensibleUnionH (u' '[h1, h2, h3] ': hs) f Source #

bundleUnion4H :: forall (u' :: [Signature] -> Signature) (h1 :: Signature) (h2 :: Signature) (h3 :: Signature) (h4 :: Signature) (hs :: [Signature]) (f :: Type -> Type). UnionH u' => ExtensibleUnionH (h1 ': (h2 ': (h3 ': (h4 ': hs)))) f ~> ExtensibleUnionH (u' '[h1, h2, h3, h4] ': hs) f Source #

unbundleUnion2H :: forall (u' :: [Signature] -> Signature) (h1 :: Signature) (h2 :: Signature) (hs :: [Signature]) (f :: Type -> Type). UnionH u' => ExtensibleUnionH (u' '[h1, h2] ': hs) f ~> ExtensibleUnionH (h1 ': (h2 ': hs)) f Source #

unbundleUnion3H :: forall (u' :: [Signature] -> Signature) (h1 :: Signature) (h2 :: Signature) (h3 :: Signature) (hs :: [Signature]) (f :: Type -> Type). UnionH u' => ExtensibleUnionH (u' '[h1, h2, h3] ': hs) f ~> ExtensibleUnionH (h1 ': (h2 ': (h3 ': hs))) f Source #

unbundleUnion4H :: forall (u' :: [Signature] -> Signature) (h1 :: Signature) (h2 :: Signature) (h3 :: Signature) (h4 :: Signature) (hs :: [Signature]) (f :: Type -> Type). UnionH u' => ExtensibleUnionH (u' '[h1, h2, h3, h4] ': hs) f ~> ExtensibleUnionH (h1 ': (h2 ': (h3 ': (h4 ': hs)))) f Source #

Forall HFunctor hs => HFunctor (ExtensibleUnionH hs) Source # 
Instance details

Defined in Data.Hefty.Extensible

Methods

hfmap :: forall (f :: Type -> Type) (g :: Type -> Type). (f :-> g) -> ExtensibleUnionH hs f :-> ExtensibleUnionH hs g #

type HasMembershipH ExtensibleUnionH h hs Source # 
Instance details

Defined in Data.Hefty.Extensible

newtype FieldAppH f a (h :: Signature) Source #

Constructors

FieldAppH 

Fields