Safe Haskell | None |
---|---|
Language | Haskell2010 |
Utilities for traversing heterogeneous trees. A heterogeneous tree is a collection of datatypes that "contain" eachother in some form of tree structure.
Synopsis
- type NiceQuiver (q :: k -> j -> Type) (a :: k) (b :: j) = (Typeable q, Typeable a, Typeable b, Ord (q a b), Show (q a b), AdditionalQuiverConstraints q a b)
- type family AdditionalQuiverConstraints (q :: k -> j -> Type) (a :: k) (b :: j) :: Constraint
- data Paths (q :: k -> k -> Type) (a :: k) (b :: k) where
- newtype DiffPaths (q :: k -> k -> Type) (a :: k) (b :: k) = DiffPaths (forall c. Paths q c a -> Paths q c b)
- catDiffPaths :: DiffPaths q a b -> DiffPaths q b c -> DiffPaths q a c
- data AnItem (q :: k -> k -> Type) (f :: k -> Type) (r :: k) where
- step :: NiceQuiver q a b => q a b -> Paths q a b
- (>>>) :: forall k cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c
- (<<<) :: forall k cat (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c
Documentation
type NiceQuiver (q :: k -> j -> Type) (a :: k) (b :: j) = (Typeable q, Typeable a, Typeable b, Ord (q a b), Show (q a b), AdditionalQuiverConstraints q a b) Source #
type family AdditionalQuiverConstraints (q :: k -> j -> Type) (a :: k) (b :: j) :: Constraint Source #
Instances
type AdditionalQuiverConstraints Step (_1 :: Type) (_2 :: Type) Source # | |
Defined in Data.OpenApi.Compare.Subtree | |
type AdditionalQuiverConstraints Behave (a :: BehaviorLevel) (b :: BehaviorLevel) Source # | |
Defined in Data.OpenApi.Compare.Behavior |
data Paths (q :: k -> k -> Type) (a :: k) (b :: k) where Source #
All the possible ways to navigate between nodes in a heterogeneous tree form a quiver. The hom-sets of the free category constructed from this quiver are the sets of various multi-step paths between nodes. This is similar to a list, but indexed. The list is in reverse because in practice we append items at the end one at a time.
Instances
Subtree PathFragmentParam Source # | |
Defined in Data.OpenApi.Compare.Validate.PathFragment type CheckEnv PathFragmentParam :: [Type] Source # type SubtreeLevel PathFragmentParam :: BehaviorLevel Source # checkStructuralCompatibility :: HList (CheckEnv PathFragmentParam) -> ProdCons (Traced PathFragmentParam) -> StructuralCompatFormula () Source # checkSemanticCompatibility :: HList (CheckEnv PathFragmentParam) -> Behavior (SubtreeLevel PathFragmentParam) -> ProdCons (Traced PathFragmentParam) -> SemanticCompatFormula () Source # | |
Category (Paths q :: k -> k -> Type) Source # | |
TestEquality (Paths q a :: k -> Type) Source # | |
Defined in Data.OpenApi.Compare.Paths | |
Eq (Paths q a b) Source # | |
Ord (Paths q a b) Source # | |
Defined in Data.OpenApi.Compare.Paths | |
Show (Paths q a b) Source # | |
type CheckEnv PathFragmentParam Source # | |
Defined in Data.OpenApi.Compare.Validate.PathFragment | |
type SubtreeLevel PathFragmentParam Source # | |
Defined in Data.OpenApi.Compare.Validate.PathFragment |
newtype DiffPaths (q :: k -> k -> Type) (a :: k) (b :: k) Source #
Like a differece list, but indexed.
data AnItem (q :: k -> k -> Type) (f :: k -> Type) (r :: k) where Source #
An item related to some path relative to the root r
.
Instances
Eq (AnItem q f r) Source # | |
Typeable r => Ord (AnItem q f r) Source # | |
Defined in Data.OpenApi.Compare.Paths |
step :: NiceQuiver q a b => q a b -> Paths q a b Source #