Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A convinience module which re-exports common functionality of the hypertypes library
Synopsis
- class Generic a
- data Constraint
- data ((f :: k -> Type) :*: (g :: k -> Type)) (p :: k) = (f p) :*: (g p)
- newtype Const a (b :: k) = Const {
- getConst :: a
- data Proxy (t :: k) = Proxy
- withDict :: HasDict c e => e -> (c => r) -> r
- data Dict a where
- type (:#) h p = GetHyperType h # p
- type (#) h p = h ('AHyperType p) :: Type
- type family GetHyperType h where ...
- newtype AHyperType = AHyperType HyperType
- type HyperType = AHyperType -> Type
- asHyper :: (h # p) -> h # p
- newtype HFunc (i :: HyperType) o h = HFunc (i h -> o h)
- _HFunc :: Iso (HFunc i0 o0 # h0) (HFunc i1 o1 # h1) ((i0 # h0) -> o0 # h0) ((i1 # h1) -> o1 # h1)
- class HNodes (h :: HyperType) where
- type HNodesConstraint h (c :: HyperType -> Constraint) :: Constraint
- type HWitnessType h :: HyperType -> Type
- hLiftConstraint :: HNodesConstraint h c => HWitness h n -> Proxy c -> (c n => r) -> r
- newtype HWitness h n = HWitness (HWitnessType h n)
- _HWitness :: forall h n h n. Iso (HWitness h n) (HWitness h n) (HWitnessType h n) (HWitnessType h n)
- (#>) :: (HNodes h, HNodesConstraint h c) => Proxy c -> (c n => r) -> HWitness h n -> r
- (#*#) :: (HNodes h, HNodesConstraint h c) => Proxy c -> (c n => HWitness h n -> r) -> HWitness h n -> r
- class HNodes h => HPointed h where
- class HNodes h => HFunctor h where
- hmapped1 :: forall h n p q. (HFunctor h, HNodesConstraint h ((~) n)) => Setter (h # p) (h # q) (p # n) (q # n)
- class HNodes h => HFoldable h where
- hfolded1 :: forall h n p. (HFoldable h, HNodesConstraint h ((~) n)) => Fold (h # p) (p # n)
- htraverse_ :: (Applicative f, HFoldable h) => (forall c. HWitness h c -> (m # c) -> f ()) -> (h # m) -> f ()
- htraverse1_ :: forall f h n p. (Applicative f, HFoldable h, HNodesConstraint h ((~) n)) => ((p # n) -> f ()) -> (h # p) -> f ()
- class (HFunctor h, HFoldable h) => HTraversable h where
- hsequence :: Applicative f => (h # ContainedH f p) -> f (h # p)
- htraverse :: (Applicative f, HTraversable h) => (forall n. HWitness h n -> (p # n) -> f (q # n)) -> (h # p) -> f (h # q)
- htraverse1 :: (HTraversable h, HNodesConstraint h ((~) n)) => Traversal (h # p) (h # q) (p # n) (q # n)
- newtype HFlip f x h = MkHFlip (f (GetHyperType h) # x)
- _HFlip :: Iso (HFlip f0 x0 # k0) (HFlip f1 x1 # k1) (f0 k0 # x0) (f1 k1 # x1)
- hflipped :: Iso (f0 k0 # x0) (f1 k1 # x1) (HFlip f0 x0 # k0) (HFlip f1 x1 # k1)
- htraverseFlipped :: (Applicative f, HTraversable (HFlip h a)) => (forall n. HWitness (HFlip h a) n -> (p # n) -> f (q # n)) -> (h p # a) -> f (h q # a)
- data family MorphWitness s t :: HyperType -> HyperType -> Type
- makeHMorph :: Name -> DecsQ
- type HApplicative h = (HPointed h, HApply h)
- class HFunctor h => HApply h where
- liftH2 :: HApply h => (forall n. HWitness h n -> (p # n) -> (q # n) -> r # n) -> (h # p) -> (h # q) -> h # r
- makeHApplicativeBases :: Name -> DecsQ
- makeHTraversableApplyAndBases :: Name -> DecsQ
- makeHTraversableAndBases :: Name -> DecsQ
- newtype Pure h = Pure (h :# Pure)
- data W_Pure node where
- _Pure :: Iso (Pure # h) (Pure # j) (h # Pure) (j # Pure)
- makeZipMatch :: Name -> DecsQ
- class (HTraversable h, Recursively HFunctor h, Recursively HFoldable h) => RTraversable h
- class RNodes h => Recursively c h where
- recursively :: proxy (c h) -> Dict (c h, HNodesConstraint h (Recursively c))
- class HNodes h => RNodes h
- data Ann a h = Ann {}
- hAnn :: forall a h. Lens' (Ann a h) (a h)
- hVal :: forall a h. Lens' (Ann a h) ((:#) h (Ann a))
- type Annotated a = Ann (Const a)
- annotation :: Lens' (Annotated a # h) a
- annValue :: Lens (Annotated a # h0) (Annotated a # h1) (h0 # Annotated a) (h1 # Annotated a)
- newtype HCompose a b h = HCompose {
- getHCompose :: a # HCompose b (GetHyperType h)
- _HCompose :: Iso (HCompose a0 b0 # h0) (HCompose a1 b1 # h1) (a0 # HCompose b0 h0) (a1 # HCompose b1 h1)
- hcomposed :: (Profunctor p, Functor f) => Optic p f (a0 # HCompose b0 c0) (a1 # HCompose b1 c1) (HCompose a2 b2 # c2) (HCompose a3 b3 # c3) -> Optic p f (HCompose a0 b0 # c0) (HCompose a1 b1 # c1) (a2 # HCompose b2 c2) (a3 # HCompose b3 c3)
- newtype ANode c h = MkANode (h :# c)
- _ANode :: Iso (ANode c0 # k0) (ANode c1 # k1) (k0 # c0) (k1 # c1)
- data W_ANode (c :: HyperType) node where
- class Show (HPlain h) => HasHPlain h where
- makeHasHPlain :: [Name] -> DecsQ
- makeHContext :: Name -> DecsQ
Documentation
Representable types of kind *
.
This class is derivable in GHC with the DeriveGeneric
flag on.
A Generic
instance must satisfy the following laws:
from
.to
≡id
to
.from
≡id
Instances
data Constraint #
The kind of constraints, like Show a
data ((f :: k -> Type) :*: (g :: k -> Type)) (p :: k) infixr 6 #
Products: encode multiple arguments to constructors
(f p) :*: (g p) infixr 6 |
Instances
(p ~ GT (GSize s) n, p ~ GT (GSize t) n, GIxed' p n s s' t t' a b) => GIxed (n :: Type) (s :*: s' :: Type -> Type) (t :*: t' :: Type -> Type) a b | |
Defined in Control.Lens.Tuple | |
(GPlated a f, GPlated a g) => GPlated a (f :*: g :: k -> Type) | |
Defined in Control.Lens.Plated gplate' :: forall (p :: k0). Traversal' ((f :*: g) p) a | |
(GPlated1 f g, GPlated1 f h) => GPlated1 (f :: k -> Type) (g :*: h :: k -> Type) | recursive match |
Defined in Control.Lens.Plated gplate1' :: forall (a :: k0). Traversal' ((g :*: h) a) (f a) | |
Generic1 (f :*: g :: k -> Type) | |
(GNFData arity a, GNFData arity b) => GNFData arity (a :*: b) | |
Defined in Control.DeepSeq | |
(GShowFields p f, GShowFields p g) => GShowFields p (f :*: g) | |
Defined in Generic.Data.Internal.Show gPrecShowsFields :: p (ShowsPrec a) -> (f :*: g) a -> [PrecShowS] # | |
(GShowNamed p f, GShowNamed p g) => GShowNamed p (f :*: g) | |
Defined in Generic.Data.Internal.Show gPrecShowsNamed :: p (ShowsPrec a) -> (f :*: g) a -> ShowFields # | |
(GTraverse arr f, GTraverse arr g) => GTraverse arr (f :*: g) | |
Defined in Generic.Data.Internal.Traversable gtraverse_ :: forall (f0 :: Type -> Type) a b. Applicative f0 => arr f0 a b -> (f :*: g) a -> Aps f0 ((f :*: g) b) # | |
(FoldableWithIndex i f, FoldableWithIndex j g) => FoldableWithIndex (Either i j) (f :*: g) | |
Defined in WithIndex ifoldMap :: Monoid m => (Either i j -> a -> m) -> (f :*: g) a -> m # ifoldMap' :: Monoid m => (Either i j -> a -> m) -> (f :*: g) a -> m # ifoldr :: (Either i j -> a -> b -> b) -> b -> (f :*: g) a -> b # ifoldl :: (Either i j -> b -> a -> b) -> b -> (f :*: g) a -> b # ifoldr' :: (Either i j -> a -> b -> b) -> b -> (f :*: g) a -> b # ifoldl' :: (Either i j -> b -> a -> b) -> b -> (f :*: g) a -> b # | |
(FunctorWithIndex i f, FunctorWithIndex j g) => FunctorWithIndex (Either i j) (f :*: g) | |
(TraversableWithIndex i f, TraversableWithIndex j g) => TraversableWithIndex (Either i j) (f :*: g) | |
(GIndex f, GIndex g) => GIndex (f :*: g) | |
Defined in Data.Functor.Rep | |
(GTabulate f, GTabulate g) => GTabulate (f :*: g) | |
Defined in Data.Functor.Rep gtabulate' :: (GRep' (f :*: g) -> a) -> (f :*: g) a | |
(Representable f, Representable g) => Representable (f :*: g) | |
(MonadFix f, MonadFix g) => MonadFix (f :*: g) | Since: base-4.9.0.0 |
Defined in Control.Monad.Fix | |
(Foldable f, Foldable g) => Foldable (f :*: g) | Since: base-4.9.0.0 |
Defined in Data.Foldable fold :: Monoid m => (f :*: g) m -> m # foldMap :: Monoid m => (a -> m) -> (f :*: g) a -> m # foldMap' :: Monoid m => (a -> m) -> (f :*: g) a -> m # foldr :: (a -> b -> b) -> b -> (f :*: g) a -> b # foldr' :: (a -> b -> b) -> b -> (f :*: g) a -> b # foldl :: (b -> a -> b) -> b -> (f :*: g) a -> b # foldl' :: (b -> a -> b) -> b -> (f :*: g) a -> b # foldr1 :: (a -> a -> a) -> (f :*: g) a -> a # foldl1 :: (a -> a -> a) -> (f :*: g) a -> a # toList :: (f :*: g) a -> [a] # length :: (f :*: g) a -> Int # elem :: Eq a => a -> (f :*: g) a -> Bool # maximum :: Ord a => (f :*: g) a -> a # minimum :: Ord a => (f :*: g) a -> a # | |
(Contravariant f, Contravariant g) => Contravariant (f :*: g) | |
(Traversable f, Traversable g) => Traversable (f :*: g) | Since: base-4.9.0.0 |
(Alternative f, Alternative g) => Alternative (f :*: g) | Since: base-4.9.0.0 |
(Applicative f, Applicative g) => Applicative (f :*: g) | Since: base-4.9.0.0 |
(Functor f, Functor g) => Functor (f :*: g) | Since: base-4.9.0.0 |
(Monad f, Monad g) => Monad (f :*: g) | Since: base-4.9.0.0 |
(MonadPlus f, MonadPlus g) => MonadPlus (f :*: g) | Since: base-4.9.0.0 |
(Distributive a, Distributive b) => Distributive (a :*: b) | |
Defined in Data.Distributive | |
(GFoldMap f, GFoldMap g) => GFoldMap (f :*: g) | |
(HApply a, HApply b) => HApply (a :*: b) Source # | |
(HFoldable a, HFoldable b) => HFoldable (a :*: b) Source # | |
(HFunctor a, HFunctor b) => HFunctor (a :*: b) Source # | |
(HNodes a, HNodes b) => HNodes (a :*: b) Source # | |
Defined in Hyper.Class.Nodes type HNodesConstraint (a :*: b) c Source # hLiftConstraint :: forall c (n :: HyperType) r. HNodesConstraint (a :*: b) c => HWitness (a :*: b) n -> Proxy c -> (c n => r) -> r Source # | |
(HPointed a, HPointed b) => HPointed (a :*: b) Source # | |
(HTraversable a, HTraversable b) => HTraversable (a :*: b) Source # | |
Defined in Hyper.Class.Traversable hsequence :: forall f (p :: AHyperType -> Type). Applicative f => ((a :*: b) # ContainedH f p) -> f ((a :*: b) # p) Source # | |
(ZipMatch a, ZipMatch b) => ZipMatch (a :*: b) Source # | |
(Apply f, Apply g) => Apply (f :*: g) | |
(Bind f, Bind g) => Bind (f :*: g) | Since: semigroupoids-5.3.8 |
(Typeable f, Typeable g, Data p, Data (f p), Data (g p)) => Data ((f :*: g) p) | Since: base-4.9.0.0 |
Defined in Data.Data gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> (f :*: g) p -> c ((f :*: g) p) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ((f :*: g) p) # toConstr :: (f :*: g) p -> Constr # dataTypeOf :: (f :*: g) p -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ((f :*: g) p)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ((f :*: g) p)) # gmapT :: (forall b. Data b => b -> b) -> (f :*: g) p -> (f :*: g) p # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (f :*: g) p -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (f :*: g) p -> r # gmapQ :: (forall d. Data d => d -> u) -> (f :*: g) p -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> (f :*: g) p -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> (f :*: g) p -> m ((f :*: g) p) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (f :*: g) p -> m ((f :*: g) p) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (f :*: g) p -> m ((f :*: g) p) # | |
(Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p) | Since: base-4.12.0.0 |
(Semigroup (f p), Semigroup (g p)) => Semigroup ((f :*: g) p) | Since: base-4.12.0.0 |
Generic ((f :*: g) p) | |
(Read (f p), Read (g p)) => Read ((f :*: g) p) | Since: base-4.7.0.0 |
(Show (f p), Show (g p)) => Show ((f :*: g) p) | Since: base-4.7.0.0 |
(Eq (f p), Eq (g p)) => Eq ((f :*: g) p) | Since: base-4.7.0.0 |
(Ord (f p), Ord (g p)) => Ord ((f :*: g) p) | Since: base-4.7.0.0 |
Field1 ((f :*: g) p) ((f' :*: g) p) (f p) (f' p) | |
Field2 ((f :*: g) p) ((f :*: g') p) (g p) (g' p) | |
type Rep1 (f :*: g :: k -> Type) | Since: base-4.9.0.0 |
Defined in GHC.Generics type Rep1 (f :*: g :: k -> Type) = D1 ('MetaData ":*:" "GHC.Generics" "base" 'False) (C1 ('MetaCons ":*:" ('InfixI 'RightAssociative 6) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 f) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 g))) | |
type NFields (f :*: g :: k -> Type) | |
type GRep' (f :*: g) | |
Defined in Data.Functor.Rep | |
type Rep (f :*: g) | |
type HWitnessType (a :*: b) Source # | |
Defined in Hyper.Class.Nodes | |
type GSize (a :*: b) | |
Defined in Control.Lens.Tuple type GSize (a :*: b) = Add (GSize a) (GSize b) | |
type Constraints' (f :*: g) c | |
Defined in Generics.Constraints type Constraints' (f :*: g) c = (Constraints' f c, Constraints' g c) | |
type HNodesConstraint (a :*: b) x Source # | |
Defined in Hyper.Class.Nodes | |
type Rep ((f :*: g) p) | Since: base-4.7.0.0 |
Defined in GHC.Generics type Rep ((f :*: g) p) = D1 ('MetaData ":*:" "GHC.Generics" "base" 'False) (C1 ('MetaCons ":*:" ('InfixI 'RightAssociative 6) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f p)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (g p)))) |
The Const
functor.
Instances
() :=> (Functor (Const a :: Type -> Type)) | |
Semigroupoid (Const :: Type -> Type -> Type) | |
Generic1 (Const a :: k -> Type) | |
c (Const a :: AHyperType -> Type) => Recursively c (Const a :: AHyperType -> Type) Source # | |
Defined in Hyper.Class.Recursive recursively :: proxy (c (Const a)) -> Dict (c (Const a), HNodesConstraint (Const a) (Recursively c)) Source # | |
FoldableWithIndex Void (Const e :: Type -> Type) | |
Defined in WithIndex | |
FunctorWithIndex Void (Const e :: Type -> Type) | |
TraversableWithIndex Void (Const e :: Type -> Type) | |
Unbox a => Vector Vector (Const a b) | |
Defined in Data.Vector.Unboxed.Base basicUnsafeFreeze :: Mutable Vector s (Const a b) -> ST s (Vector (Const a b)) # basicUnsafeThaw :: Vector (Const a b) -> ST s (Mutable Vector s (Const a b)) # basicLength :: Vector (Const a b) -> Int # basicUnsafeSlice :: Int -> Int -> Vector (Const a b) -> Vector (Const a b) # basicUnsafeIndexM :: Vector (Const a b) -> Int -> Box (Const a b) # basicUnsafeCopy :: Mutable Vector s (Const a b) -> Vector (Const a b) -> ST s () # | |
Unbox a => MVector MVector (Const a b) | |
Defined in Data.Vector.Unboxed.Base basicLength :: MVector s (Const a b) -> Int # basicUnsafeSlice :: Int -> Int -> MVector s (Const a b) -> MVector s (Const a b) # basicOverlaps :: MVector s (Const a b) -> MVector s (Const a b) -> Bool # basicUnsafeNew :: Int -> ST s (MVector s (Const a b)) # basicInitialize :: MVector s (Const a b) -> ST s () # basicUnsafeReplicate :: Int -> Const a b -> ST s (MVector s (Const a b)) # basicUnsafeRead :: MVector s (Const a b) -> Int -> ST s (Const a b) # basicUnsafeWrite :: MVector s (Const a b) -> Int -> Const a b -> ST s () # basicClear :: MVector s (Const a b) -> ST s () # basicSet :: MVector s (Const a b) -> Const a b -> ST s () # basicUnsafeCopy :: MVector s (Const a b) -> MVector s (Const a b) -> ST s () # basicUnsafeMove :: MVector s (Const a b) -> MVector s (Const a b) -> ST s () # basicUnsafeGrow :: MVector s (Const a b) -> Int -> ST s (MVector s (Const a b)) # | |
Bifoldable (Const :: Type -> TYPE LiftedRep -> Type) | Since: base-4.10.0.0 |
Bifunctor (Const :: Type -> Type -> Type) | Since: base-4.8.0.0 |
Bitraversable (Const :: Type -> Type -> Type) | Since: base-4.10.0.0 |
Defined in Data.Bitraversable bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Const a b -> f (Const c d) # | |
Eq2 (Const :: Type -> Type -> Type) | Since: base-4.9.0.0 |
Ord2 (Const :: Type -> Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Functor.Classes | |
Read2 (Const :: Type -> Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Functor.Classes liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Const a b) # liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Const a b] # liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Const a b) # liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Const a b] # | |
Show2 (Const :: Type -> TYPE LiftedRep -> Type) | Since: base-4.9.0.0 |
Biapplicative (Const :: Type -> Type -> Type) | |
NFData2 (Const :: Type -> Type -> Type) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
Hashable2 (Const :: Type -> Type -> Type) | |
Defined in Data.Hashable.Class | |
Biapply (Const :: Type -> Type -> Type) | |
(Monoid a) :=> (Applicative (Const a :: Type -> Type)) | |
Defined in Data.Constraint | |
(Monoid a) :=> (Monoid (Const a b)) | |
(Semigroup a) :=> (Semigroup (Const a b)) | |
(Bits a) :=> (Bits (Const a b)) | |
(Bounded a) :=> (Bounded (Const a b)) | |
(Enum a) :=> (Enum (Const a b)) | |
(Floating a) :=> (Floating (Const a b)) | |
(RealFloat a) :=> (RealFloat (Const a b)) | |
(Num a) :=> (Num (Const a b)) | |
(Read a) :=> (Read (Const a b)) | |
(Fractional a) :=> (Fractional (Const a b)) | |
Defined in Data.Constraint ins :: Fractional a :- Fractional (Const a b) # | |
(Integral a) :=> (Integral (Const a b)) | |
(Real a) :=> (Real (Const a b)) | |
(RealFrac a) :=> (RealFrac (Const a b)) | |
(Show a) :=> (Show (Const a b)) | |
(Eq a) :=> (Eq (Const a b)) | |
(Ord a) :=> (Ord (Const a b)) | |
Foldable (Const m :: TYPE LiftedRep -> Type) | Since: base-4.7.0.0 |
Defined in Data.Functor.Const fold :: Monoid m0 => Const m m0 -> m0 # foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 # foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 # foldr :: (a -> b -> b) -> b -> Const m a -> b # foldr' :: (a -> b -> b) -> b -> Const m a -> b # foldl :: (b -> a -> b) -> b -> Const m a -> b # foldl' :: (b -> a -> b) -> b -> Const m a -> b # foldr1 :: (a -> a -> a) -> Const m a -> a # foldl1 :: (a -> a -> a) -> Const m a -> a # elem :: Eq a => a -> Const m a -> Bool # maximum :: Ord a => Const m a -> a # minimum :: Ord a => Const m a -> a # | |
Eq a => Eq1 (Const a :: Type -> Type) | Since: base-4.9.0.0 |
Ord a => Ord1 (Const a :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Functor.Classes | |
Read a => Read1 (Const a :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Functor.Classes | |
Show a => Show1 (Const a :: TYPE LiftedRep -> Type) | Since: base-4.9.0.0 |
Contravariant (Const a :: Type -> Type) | |
Traversable (Const m :: Type -> Type) | Since: base-4.7.0.0 |
Monoid m => Applicative (Const m :: Type -> Type) | Since: base-2.0.1 |
Functor (Const m :: Type -> Type) | Since: base-2.1 |
NFData a => NFData1 (Const a :: TYPE LiftedRep -> Type) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
Hashable a => Hashable1 (Const a :: Type -> Type) | |
Defined in Data.Hashable.Class | |
Semigroup a => HApply (Const a :: AHyperType -> Type) Source # | |
HFoldable (Const a :: AHyperType -> Type) Source # | |
HFunctor (Const a :: AHyperType -> Type) Source # | |
HNodes (Const a :: AHyperType -> Type) Source # | |
Defined in Hyper.Class.Nodes type HNodesConstraint (Const a) c Source # hLiftConstraint :: forall c (n :: HyperType) r. HNodesConstraint (Const a) c => HWitness (Const a) n -> Proxy c -> (c n => r) -> r Source # | |
Monoid a => HPointed (Const a :: AHyperType -> Type) Source # | |
RNodes (Const a :: AHyperType -> Type) Source # | |
Defined in Hyper.Class.Recursive | |
RTraversable (Const a :: AHyperType -> Type) Source # | |
Defined in Hyper.Class.Recursive | |
HTraversable (Const a :: AHyperType -> Type) Source # | |
Defined in Hyper.Class.Traversable hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (Const a # ContainedH f p) -> f (Const a # p) Source # | |
Eq a => ZipMatch (Const a :: AHyperType -> Type) Source # | |
Semigroup m => Apply (Const m :: Type -> Type) | A |
Sieve (Forget r :: Type -> Type -> TYPE LiftedRep) (Const r :: Type -> Type) | |
Defined in Data.Profunctor.Sieve | |
(Typeable k, Data a, Typeable b) => Data (Const a b) | Since: base-4.10.0.0 |
Defined in Data.Data gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Const a b -> c (Const a b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Const a b) # toConstr :: Const a b -> Constr # dataTypeOf :: Const a b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Const a b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Const a b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Const a b -> Const a b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r # gmapQ :: (forall d. Data d => d -> u) -> Const a b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Const a b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) # | |
Storable a => Storable (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const | |
Monoid a => Monoid (Const a b) | Since: base-4.9.0.0 |
Semigroup a => Semigroup (Const a b) | Since: base-4.9.0.0 |
Bits a => Bits (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const (.&.) :: Const a b -> Const a b -> Const a b # (.|.) :: Const a b -> Const a b -> Const a b # xor :: Const a b -> Const a b -> Const a b # complement :: Const a b -> Const a b # shift :: Const a b -> Int -> Const a b # rotate :: Const a b -> Int -> Const a b # setBit :: Const a b -> Int -> Const a b # clearBit :: Const a b -> Int -> Const a b # complementBit :: Const a b -> Int -> Const a b # testBit :: Const a b -> Int -> Bool # bitSizeMaybe :: Const a b -> Maybe Int # isSigned :: Const a b -> Bool # shiftL :: Const a b -> Int -> Const a b # unsafeShiftL :: Const a b -> Int -> Const a b # shiftR :: Const a b -> Int -> Const a b # unsafeShiftR :: Const a b -> Int -> Const a b # rotateL :: Const a b -> Int -> Const a b # | |
FiniteBits a => FiniteBits (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const finiteBitSize :: Const a b -> Int # countLeadingZeros :: Const a b -> Int # countTrailingZeros :: Const a b -> Int # | |
Bounded a => Bounded (Const a b) | Since: base-4.9.0.0 |
Enum a => Enum (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const succ :: Const a b -> Const a b # pred :: Const a b -> Const a b # fromEnum :: Const a b -> Int # enumFrom :: Const a b -> [Const a b] # enumFromThen :: Const a b -> Const a b -> [Const a b] # enumFromTo :: Const a b -> Const a b -> [Const a b] # enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] # | |
Floating a => Floating (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const exp :: Const a b -> Const a b # log :: Const a b -> Const a b # sqrt :: Const a b -> Const a b # (**) :: Const a b -> Const a b -> Const a b # logBase :: Const a b -> Const a b -> Const a b # sin :: Const a b -> Const a b # cos :: Const a b -> Const a b # tan :: Const a b -> Const a b # asin :: Const a b -> Const a b # acos :: Const a b -> Const a b # atan :: Const a b -> Const a b # sinh :: Const a b -> Const a b # cosh :: Const a b -> Const a b # tanh :: Const a b -> Const a b # asinh :: Const a b -> Const a b # acosh :: Const a b -> Const a b # atanh :: Const a b -> Const a b # log1p :: Const a b -> Const a b # expm1 :: Const a b -> Const a b # | |
RealFloat a => RealFloat (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const floatRadix :: Const a b -> Integer # floatDigits :: Const a b -> Int # floatRange :: Const a b -> (Int, Int) # decodeFloat :: Const a b -> (Integer, Int) # encodeFloat :: Integer -> Int -> Const a b # exponent :: Const a b -> Int # significand :: Const a b -> Const a b # scaleFloat :: Int -> Const a b -> Const a b # isInfinite :: Const a b -> Bool # isDenormalized :: Const a b -> Bool # isNegativeZero :: Const a b -> Bool # | |
Generic (Const a b) | |
Ix a => Ix (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const range :: (Const a b, Const a b) -> [Const a b] # index :: (Const a b, Const a b) -> Const a b -> Int # unsafeIndex :: (Const a b, Const a b) -> Const a b -> Int # inRange :: (Const a b, Const a b) -> Const a b -> Bool # rangeSize :: (Const a b, Const a b) -> Int # unsafeRangeSize :: (Const a b, Const a b) -> Int # | |
Num a => Num (Const a b) | Since: base-4.9.0.0 |
Read a => Read (Const a b) | This instance would be equivalent to the derived instances of the
Since: base-4.8.0.0 |
Fractional a => Fractional (Const a b) | Since: base-4.9.0.0 |
Integral a => Integral (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const | |
Real a => Real (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const toRational :: Const a b -> Rational # | |
RealFrac a => RealFrac (Const a b) | Since: base-4.9.0.0 |
Show a => Show (Const a b) | This instance would be equivalent to the derived instances of the
Since: base-4.8.0.0 |
NFData a => NFData (Const a b) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
Eq a => Eq (Const a b) | Since: base-4.9.0.0 |
Ord a => Ord (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const | |
Hashable a => Hashable (Const a b) | |
Defined in Data.Hashable.Class | |
Wrapped (Const a x) | |
Prim a => Prim (Const a b) | Since: primitive-0.6.5.0 |
Defined in Data.Primitive.Types sizeOf# :: Const a b -> Int# # alignment# :: Const a b -> Int# # indexByteArray# :: ByteArray# -> Int# -> Const a b # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, Const a b #) # writeByteArray# :: MutableByteArray# s -> Int# -> Const a b -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> Const a b -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> Const a b # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, Const a b #) # writeOffAddr# :: Addr# -> Int# -> Const a b -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> Const a b -> State# s -> State# s # | |
Unbox a => Unbox (Const a b) | |
Defined in Data.Vector.Unboxed.Base | |
t ~ Const a' x' => Rewrapped (Const a x) t | |
Defined in Control.Lens.Wrapped | |
type Rep1 (Const a :: k -> Type) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const | |
newtype MVector s (Const a b) | |
Defined in Data.Vector.Unboxed.Base | |
type HWitnessType (Const a :: AHyperType -> Type) Source # | |
Defined in Hyper.Class.Nodes | |
type HNodesConstraint (Const a :: AHyperType -> Type) _1 Source # | |
Defined in Hyper.Class.Nodes | |
type Rep (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const | |
type Unwrapped (Const a x) | |
Defined in Control.Lens.Wrapped | |
newtype Vector (Const a b) | |
Defined in Data.Vector.Unboxed.Base |
Proxy
is a type that holds no data, but has a phantom parameter of
arbitrary type (or even kind). Its use is to provide type information, even
though there is no value available of that type (or it may be too costly to
create one).
Historically,
is a safer alternative to the
Proxy
:: Proxy
a
idiom.undefined
:: a
>>>
Proxy :: Proxy (Void, Int -> Int)
Proxy
Proxy can even hold types of higher kinds,
>>>
Proxy :: Proxy Either
Proxy
>>>
Proxy :: Proxy Functor
Proxy
>>>
Proxy :: Proxy complicatedStructure
Proxy
Instances
Generic1 (Proxy :: k -> Type) | |
FoldableWithIndex Void (Proxy :: Type -> Type) | |
Defined in WithIndex | |
FunctorWithIndex Void (Proxy :: Type -> Type) | |
TraversableWithIndex Void (Proxy :: Type -> Type) | |
Representable (Proxy :: Type -> Type) | |
Foldable (Proxy :: TYPE LiftedRep -> Type) | Since: base-4.7.0.0 |
Defined in Data.Foldable fold :: Monoid m => Proxy m -> m # foldMap :: Monoid m => (a -> m) -> Proxy a -> m # foldMap' :: Monoid m => (a -> m) -> Proxy a -> m # foldr :: (a -> b -> b) -> b -> Proxy a -> b # foldr' :: (a -> b -> b) -> b -> Proxy a -> b # foldl :: (b -> a -> b) -> b -> Proxy a -> b # foldl' :: (b -> a -> b) -> b -> Proxy a -> b # foldr1 :: (a -> a -> a) -> Proxy a -> a # foldl1 :: (a -> a -> a) -> Proxy a -> a # elem :: Eq a => a -> Proxy a -> Bool # maximum :: Ord a => Proxy a -> a # minimum :: Ord a => Proxy a -> a # | |
Eq1 (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
Ord1 (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Functor.Classes | |
Read1 (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Functor.Classes | |
Show1 (Proxy :: TYPE LiftedRep -> Type) | Since: base-4.9.0.0 |
Contravariant (Proxy :: Type -> Type) | |
Traversable (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
Alternative (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
Applicative (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
Functor (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
Monad (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
MonadPlus (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
NFData1 (Proxy :: TYPE LiftedRep -> Type) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
Distributive (Proxy :: Type -> Type) | |
Hashable1 (Proxy :: Type -> Type) | |
Defined in Data.Hashable.Class | |
Apply (Proxy :: Type -> Type) | |
Bind (Proxy :: Type -> Type) | |
Cosieve (Tagged :: Type -> Type -> Type) (Proxy :: Type -> Type) | |
Defined in Data.Profunctor.Sieve | |
Data t => Data (Proxy t) | Since: base-4.7.0.0 |
Defined in Data.Data gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Proxy t -> c (Proxy t) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Proxy t) # toConstr :: Proxy t -> Constr # dataTypeOf :: Proxy t -> DataType # dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (Proxy t)) # dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (Proxy t)) # gmapT :: (forall b. Data b => b -> b) -> Proxy t -> Proxy t # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Proxy t -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Proxy t -> r # gmapQ :: (forall d. Data d => d -> u) -> Proxy t -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Proxy t -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) # | |
Monoid (Proxy s) | Since: base-4.7.0.0 |
Semigroup (Proxy s) | Since: base-4.9.0.0 |
Bounded (Proxy t) | Since: base-4.7.0.0 |
Enum (Proxy s) | Since: base-4.7.0.0 |
Generic (Proxy t) | |
Ix (Proxy s) | Since: base-4.7.0.0 |
Defined in Data.Proxy | |
Read (Proxy t) | Since: base-4.7.0.0 |
Show (Proxy s) | Since: base-4.7.0.0 |
NFData (Proxy a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
Eq (Proxy s) | Since: base-4.7.0.0 |
Ord (Proxy s) | Since: base-4.7.0.0 |
Hashable (Proxy a) | |
Defined in Data.Hashable.Class | |
type Rep1 (Proxy :: k -> Type) | Since: base-4.6.0.0 |
type Rep (Proxy :: Type -> Type) | |
type Rep (Proxy t) | Since: base-4.6.0.0 |
withDict :: HasDict c e => e -> (c => r) -> r #
From a Dict
, takes a value in an environment where the instance
witnessed by the Dict
is in scope, and evaluates it.
Essentially a deconstruction of a Dict
into its continuation-style
form.
Can also be used to deconstruct an entailment, a
, using a context :-
ba
.
withDict ::Dict
c -> (c => r) -> r withDict :: a => (a:-
c) -> (c => r) -> r
Values of type
capture a dictionary for a constraint of type Dict
pp
.
e.g.
Dict
::Dict
(Eq
Int
)
captures a dictionary that proves we have an:
instanceEq
Int
Pattern matching on the Dict
constructor will bring this instance into scope.
Instances
() :=> (Semigroup (Dict a)) | |
() :=> (Show (Dict a)) | |
() :=> (Eq (Dict a)) | |
() :=> (Ord (Dict a)) | |
a :=> (Monoid (Dict a)) | |
a :=> (Bounded (Dict a)) | |
a :=> (Enum (Dict a)) | |
a :=> (Read (Dict a)) | |
HasDict a (Dict a) | |
Defined in Data.Constraint | |
(Typeable p, p) => Data (Dict p) | |
Defined in Data.Constraint gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Dict p -> c (Dict p) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Dict p) # toConstr :: Dict p -> Constr # dataTypeOf :: Dict p -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Dict p)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Dict p)) # gmapT :: (forall b. Data b => b -> b) -> Dict p -> Dict p # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Dict p -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Dict p -> r # gmapQ :: (forall d. Data d => d -> u) -> Dict p -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Dict p -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Dict p -> m (Dict p) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Dict p -> m (Dict p) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Dict p -> m (Dict p) # | |
a => Monoid (Dict a) | |
Semigroup (Dict a) | |
a => Bounded (Dict a) | |
a => Enum (Dict a) | |
Defined in Data.Constraint | |
a => Read (Dict a) | |
Show (Dict a) | |
NFData (Dict c) | |
Defined in Data.Constraint | |
Eq (Dict a) | |
Ord (Dict a) | |
type (:#) h p = GetHyperType h # p Source #
A type synonym to express child nodes in nested-HKDs
type (#) h p = h ('AHyperType p) :: Type Source #
A type synonym to express nested-HKD structures
type family GetHyperType h where ... Source #
A type-level getter for the type constructor encoded in AHyperType
.
Notes:
- If
DataKinds
supported lifting field getters this would had been replaced with the type's getter. GetHyperType
is injective, but due to no support for constrained type families, that's not expressible at the moment.- Because
GetHyperType
can't declared as bijective, uses of it may restrict inference. In those cases wrapping terms with theasHyper
helper assists Haskell's type inference as if Haskell knew thatGetHyperType
was bijective.
GetHyperType ('AHyperType t) = t |
newtype AHyperType Source #
Instances
type HyperType = AHyperType -> Type Source #
A hypertype is a type parameterized by a hypertype
asHyper :: (h # p) -> h # p Source #
An id
variant which tells the type checker that its argument is a hypertype.
See the notes for GetHyperType
which expand on why this might be used.
Note that asHyper
may often be used during development to assist the inference of incomplete code,
but removed once the code is complete.
_HFunc :: Iso (HFunc i0 o0 # h0) (HFunc i1 o1 # h1) ((i0 # h0) -> o0 # h0) ((i1 # h1) -> o1 # h1) Source #
class HNodes (h :: HyperType) where Source #
HNodes
allows talking about the child nodes of a HyperType
.
Various classes like HFunctor
build upon HNodes
to provide methods such as hmap
which provide a rank-n function
for processing child nodes which requires a constraint on the nodes.
Nothing
type HNodesConstraint h (c :: HyperType -> Constraint) :: Constraint Source #
Lift a constraint to apply to the child nodes
type HNodesConstraint h c = HNodesConstraint (Rep1 h) c
type HWitnessType h :: HyperType -> Type Source #
HWitness h n
is a witness that n
is a node of h
.
A value quantified with forall n. HWitness h n -> ... n
,
is equivalent for a "for-some" where the possible values for n
are the nodes of h
.
type HWitnessType h = HWitnessType (Rep1 h)
hLiftConstraint :: HNodesConstraint h c => HWitness h n -> Proxy c -> (c n => r) -> r Source #
Lift a rank-n value with a constraint which the child nodes satisfy to a function from a node witness.
default hLiftConstraint :: (HWitnessType h ~ HWitnessType (Rep1 h), HNodesConstraint h c ~ HNodesConstraint (Rep1 h) c, HNodes (Rep1 h), HNodesConstraint h c) => HWitness h n -> Proxy c -> (c n => r) -> r Source #
Instances
HWitness (HWitnessType h n) |
_HWitness :: forall h n h n. Iso (HWitness h n) (HWitness h n) (HWitnessType h n) (HWitnessType h n) Source #
(#>) :: (HNodes h, HNodesConstraint h c) => Proxy c -> (c n => r) -> HWitness h n -> r infixr 0 Source #
Proxy
c #> r replaces the witness parameter of
r@ with a constraint on the witnessed node
(#*#) :: (HNodes h, HNodesConstraint h c) => Proxy c -> (c n => HWitness h n -> r) -> HWitness h n -> r infixr 0 Source #
A variant of #>
which does not consume the witness parameter.
Proxy
c0 Proxy c1 #> r
brings into context both the c0 n
and c1 n
constraints.
class HNodes h => HPointed h where Source #
hpure :: (forall n. HWitness h n -> p # n) -> h # p Source #
Construct a value from a generator of h
's nodes
(a generator which can generate a tree of any type given a witness that it is a node of h
)
Instances
class HNodes h => HFunctor h where Source #
A variant of Functor
for HyperType
s
Nothing
hmap :: (forall n. HWitness h n -> (p # n) -> q # n) -> (h # p) -> h # q Source #
Applied a given mapping for h
's nodes (trees along witnesses that they are nodes of h
)
to result with a new tree, potentially with a different nest type.
Instances
hmapped1 :: forall h n p q. (HFunctor h, HNodesConstraint h ((~) n)) => Setter (h # p) (h # q) (p # n) (q # n) Source #
class HNodes h => HFoldable h where Source #
Nothing
hfoldMap :: Monoid a => (forall n. HWitness h n -> (p # n) -> a) -> (h # p) -> a Source #
Gets a function from h
's nodes (trees along witnesses that they are nodes of h
)
into a monoid and concats its results for all nodes.
Instances
hfolded1 :: forall h n p. (HFoldable h, HNodesConstraint h ((~) n)) => Fold (h # p) (p # n) Source #
htraverse_ :: (Applicative f, HFoldable h) => (forall c. HWitness h c -> (m # c) -> f ()) -> (h # m) -> f () Source #
htraverse1_ :: forall f h n p. (Applicative f, HFoldable h, HNodesConstraint h ((~) n)) => ((p # n) -> f ()) -> (h # p) -> f () Source #
class (HFunctor h, HFoldable h) => HTraversable h where Source #
A variant of Traversable
for HyperType
s
Nothing
hsequence :: Applicative f => (h # ContainedH f p) -> f (h # p) Source #
HTraversable
variant of sequenceA
default hsequence :: (Generic1 h, HTraversable (Rep1 h), Applicative f) => (h # ContainedH f p) -> f (h # p) Source #
Instances
htraverse :: (Applicative f, HTraversable h) => (forall n. HWitness h n -> (p # n) -> f (q # n)) -> (h # p) -> f (h # q) Source #
HTraversable
variant of traverse
htraverse1 :: (HTraversable h, HNodesConstraint h ((~) n)) => Traversal (h # p) (h # q) (p # n) (q # n) Source #
HTraversable
variant of traverse
for HyperType
s with a single node type.
It is a valid Traversal
as it avoids using RankNTypes
.
Flip the order of the last two type parameters of a HyperType
.
Useful to use instances of classes such as HTraversable
which
are available on the flipped HyperType
.
For example GTerm
has instances when flipped.
MkHFlip (f (GetHyperType h) # x) |
Instances
htraverseFlipped :: (Applicative f, HTraversable (HFlip h a)) => (forall n. HWitness (HFlip h a) n -> (p # n) -> f (q # n)) -> (h p # a) -> f (h q # a) Source #
Convinience function for traversal over second last HyperType
argument.
data family MorphWitness s t :: HyperType -> HyperType -> Type Source #
Instances
data MorphWitness (ANode a) (ANode b) _ _1 Source # | |
Defined in Hyper.Combinator.ANode | |
data MorphWitness (App expr0) (App expr1) _ _1 Source # | |
Defined in Hyper.Syntax.App data MorphWitness (App expr0) (App expr1) _ _1 where
| |
data MorphWitness (FuncType typ0) (FuncType typ1) _ _1 Source # | |
Defined in Hyper.Syntax.FuncType data MorphWitness (FuncType typ0) (FuncType typ1) _ _1 where
| |
data MorphWitness (Lam v expr0) (Lam v expr1) _ _1 Source # | |
Defined in Hyper.Syntax.Lam data MorphWitness (Lam v expr0) (Lam v expr1) _ _1 where
| |
data MorphWitness (Let v expr0) (Let v expr1) _ _1 Source # | |
Defined in Hyper.Syntax.Let data MorphWitness (Let v expr0) (Let v expr1) _ _1 where
| |
data MorphWitness (TermMap h expr0) (TermMap h expr1) _ _1 Source # | |
Defined in Hyper.Syntax.Map data MorphWitness (TermMap h expr0) (TermMap h expr1) _ _1 where
| |
data MorphWitness (ToNom nomId term0) (ToNom nomId term1) _ _1 Source # | |
Defined in Hyper.Syntax.Nominal data MorphWitness (ToNom nomId term0) (ToNom nomId term1) _ _1 where
| |
data MorphWitness (Var v expr0) (Var v expr1) _ _1 Source # | |
Defined in Hyper.Syntax.Var | |
data MorphWitness (RowExtend key val0 rest0) (RowExtend key val1 rest1) _ _1 Source # | |
Defined in Hyper.Syntax.Row data MorphWitness (RowExtend key val0 rest0) (RowExtend key val1 rest1) _ _1 where
| |
data MorphWitness (TypedLam var typ0 expr0) (TypedLam var typ1 expr1) _ _1 Source # | |
Defined in Hyper.Syntax.TypedLam data MorphWitness (TypedLam var typ0 expr0) (TypedLam var typ1 expr1) _ _1 where
|
makeHMorph :: Name -> DecsQ Source #
type HApplicative h = (HPointed h, HApply h) Source #
A variant of Applicative
for HyperType
s.
class HFunctor h => HApply h where Source #
A variant of Apply
for HyperType
s.
A type which has HApply
and HPointed
instances also has HApplicative
,
which is the equivalent to the Applicative
class.
hzip :: (h # p) -> (h # q) -> h # (p :*: q) Source #
Combine child values
>>>
hzip (Person name0 age0) (Person name1 age1)
Person (Pair name0 name1) (Pair age0 age1)
Instances
liftH2 :: HApply h => (forall n. HWitness h n -> (p # n) -> (q # n) -> r # n) -> (h # p) -> (h # q) -> h # r Source #
makeHApplicativeBases :: Name -> DecsQ Source #
makeHTraversableAndBases :: Name -> DecsQ Source #
Generate a HTraversable
instance along with the instance of its base classes:
HFoldable
, HFunctor
, and HNodes
.
A HyperType
to express the simplest plain form of a nested higher-kinded data structure
Instances
class (HTraversable h, Recursively HFunctor h, Recursively HFoldable h) => RTraversable h Source #
A class of HyperType
s which recursively implement HTraversable
Instances
class RNodes h => Recursively c h where Source #
A constraint lifted to apply recursively.
Note that in cases where a constraint has dependencies other than RNodes
,
one will want to create a class such as RTraversable to capture the dependencies,
otherwise using it in class contexts will be quite unergonomic.
Nothing
recursively :: proxy (c h) -> Dict (c h, HNodesConstraint h (Recursively c)) Source #
default recursively :: (c h, HNodesConstraint h (Recursively c)) => proxy (c h) -> Dict (c h, HNodesConstraint h (Recursively c)) Source #
Instances
class HNodes h => RNodes h Source #
Instances
RNodes Prune Source # | |
Defined in Hyper.Type.Prune | |
RNodes Pure Source # | |
Defined in Hyper.Class.Recursive | |
Recursive RNodes Source # | |
RNodes n => RNodes (ANode n) Source # | |
Defined in Hyper.Combinator.ANode | |
RNodes a => RNodes (Ann a) Source # | |
Defined in Hyper.Combinator.Ann | |
RNodes e => RNodes (App e) Source # | |
Defined in Hyper.Syntax.App | |
RNodes (F f) Source # | |
Defined in Hyper.Type.Functor | |
RNodes (Const a :: AHyperType -> Type) Source # | |
Defined in Hyper.Class.Recursive | |
(HNodes a, HNodes b, HNodesConstraint a (HComposeConstraint0 RNodes b)) => RNodes (HCompose a b) Source # | |
Defined in Hyper.Combinator.Compose | |
RNodes t => RNodes (Lam v t) Source # | |
Defined in Hyper.Syntax.Lam | |
RNodes t => RNodes (Scheme v t) Source # | |
Defined in Hyper.Syntax.Scheme | |
(RNodes t, RNodes e) => RNodes (TypedLam v t e) Source # | |
Defined in Hyper.Syntax.TypedLam |
Instances
annValue :: Lens (Annotated a # h0) (Annotated a # h1) (h0 # Annotated a) (h1 # Annotated a) Source #
Polymorphic lens to an Annotated
value
newtype HCompose a b h Source #
Compose two HyperType
s as an external and internal layer
HCompose | |
|
Instances
_HCompose :: Iso (HCompose a0 b0 # h0) (HCompose a1 b1 # h1) (a0 # HCompose b0 h0) (a1 # HCompose b1 h1) Source #
hcomposed :: (Profunctor p, Functor f) => Optic p f (a0 # HCompose b0 c0) (a1 # HCompose b1 c1) (HCompose a2 b2 # c2) (HCompose a3 b3 # c3) -> Optic p f (HCompose a0 b0 # c0) (HCompose a1 b1 # c1) (a2 # HCompose b2 c2) (a3 # HCompose b3 c3) Source #
ANode c
is a HyperType
with a single child node of type c
Instances
makeHContext :: Name -> DecsQ Source #