Safe Haskell | None |
---|---|
Language | GHC2021 |
Data.InternalCategory
Synopsis
- data Path v e where
- UnsafePath v [e] v
- pattern Path :: v -> [e] -> v -> Path v e
- pattern EmptyPath :: v -> Path v e
- pattern NonEmptyPath :: e -> [e] -> Path v e
- path :: (Eq v, IQuiver v e) => v -> [e] -> v -> Maybe (Path v e)
- emptyPath :: v -> Path v e
- singlePath :: IQuiver v e => e -> Path v e
- composePath :: Eq v => Path v e -> Path v e -> Maybe (Path v e)
- (>?>) :: Eq v => Path v e -> Path v e -> Maybe (Path v e)
- concatPath :: Path v (Path v e) -> Path v e
- errPath :: (HasCallStack, Eq v, Show v, IQuiver v e) => v -> [e] -> v -> Path v e
- errComposePath :: (HasCallStack, Show v, Eq v) => Path v e -> Path v e -> Path v e
- (>!>) :: (HasCallStack, Show v, Eq v) => Path v e -> Path v e -> Path v e
- injectLeftPath :: Path v e -> Path (Either v w) (Either e f)
- injectRightPath :: Path w f -> Path (Either v w) (Either e f)
- separateSumPath :: Path (Either v w) (Either e f) -> Either (Path v e) (Path w f)
- fstPath :: Path (v, w) (e, f) -> Path v e
- sndPath :: Path (v, w) (e, f) -> Path w f
- unsafePath :: v -> [e] -> v -> Path v e
- class IQuiver ob mor => ICategory ob mor | mor -> ob where
- dom :: ICategory ob mor => mor -> ob
- cod :: ICategory ob mor => mor -> ob
- identity :: ICategory ob mor => ob -> mor
- compose :: (Eq ob, ICategory ob mor) => mor -> mor -> Maybe mor
- class IQuiver v e | e -> v where
Path
Constructors
UnsafePath v [e] v |
Bundled Patterns
pattern Path :: v -> [e] -> v -> Path v e | |
pattern EmptyPath :: v -> Path v e | |
pattern NonEmptyPath :: e -> [e] -> Path v e |
Constructing path
singlePath :: IQuiver v e => e -> Path v e Source #
Partial construction functions
errComposePath :: (HasCallStack, Show v, Eq v) => Path v e -> Path v e -> Path v e Source #
Sum and Product of paths
Unsafe
unsafePath :: v -> [e] -> v -> Path v e Source #
Internal categories
class IQuiver ob mor => ICategory ob mor | mor -> ob where Source #
Instances
ICategory Void Void Source # | Empty graph |
ICategory () () Source # | A graph with one vertex and one loop on it |
Defined in Data.InternalCategory | |
Eq a => ICategory a (Codisc a) Source # | |
Eq a => ICategory a (Disc a) Source # | |
ICategory ob (Path ob mor) Source # |
|
(Comonad f, Polynomial f, GEq (Tag f)) => ICategory (Pos f) (Dir f) Source # | |
(Category cat, SDecide k) => ICategory (SomeSing k) (Mor k cat) Source # | |
(ICategory v e, ICategory w f) => ICategory (Either v w) (Either e f) Source # | |
(ICategory v e, ICategory w f) => ICategory (v, w) (e, f) Source # | |
Defined in Data.InternalCategory |
Reexport
class IQuiver v e | e -> v where Source #
Class for Quiver represented by types of edges and vertices
Instances
IQuiver Void Void Source # | Empty graph |
IQuiver () () Source # | A graph with one vertex and one loop on it |
IQuiver a (Codisc a) Source # | |
IQuiver a (Disc a) Source # | |
IQuiver v (Path v e) Source # | |
(Comonad f, Polynomial f, GEq (Tag f)) => IQuiver (Pos f) (Dir f) Source # | |
IQuiver (SomeSing k) (Mor k cat) Source # | |
(IQuiver v e, IQuiver w f) => IQuiver (Either v w) (Either e f) Source # | |
(IQuiver v e, IQuiver w f) => IQuiver (v, w) (e, f) Source # | |