Copyright | (c) 2023 Yamada Ryo |
---|---|
License | MPL-2.0 (see the file LICENSE) |
Maintainer | ymdfield@outlook.jp |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
An implementation of an open union for higher-order effects using the extensible package as a backend.
Synopsis
- newtype ExtensibleUnionH hs f a = ExtensibleUnionH {
- unExtensibleUnionH :: hs :/ FieldAppH f a
- newtype FieldAppH f a (h :: Signature) = FieldAppH {
- unFieldAppH :: h f a
Documentation
newtype ExtensibleUnionH hs f a Source #
An implementation of an open union for higher-order effects using the extensible package as a backend.
ExtensibleUnionH | |
|
Instances
UnionH ExtensibleUnionH Source # | |
Defined in Data.Hefty.Extensible type HasMembershipH ExtensibleUnionH h hs Source # 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 # | |
Defined in Data.Hefty.Extensible hfmap :: forall (f :: Type -> Type) (g :: Type -> Type). (f :-> g) -> ExtensibleUnionH hs f :-> ExtensibleUnionH hs g # | |
type HasMembershipH ExtensibleUnionH h hs Source # | |
Defined in Data.Hefty.Extensible |