Safe Haskell | None |
---|---|
Language | Haskell2010 |
Operations using MonadReader (TypeGraphInfo hint)
.
- fieldVertices :: MonadReader TypeGraphInfo m => TypeGraphVertex -> m (Set TypeGraphVertex)
- allVertices :: (Functor m, DsMonad m, MonadReader TypeGraphInfo m) => Maybe Field -> E Type -> m (Set TypeGraphVertex)
- vertex :: forall m. (DsMonad m, MonadReader TypeGraphInfo m) => Maybe Field -> E Type -> m TypeGraphVertex
- typeVertex :: MonadReader TypeGraphInfo m => E Type -> m TypeGraphVertex
- fieldVertex :: MonadReader TypeGraphInfo m => E Type -> Field -> m TypeGraphVertex
- typeGraphEdges :: forall hint m. (DsMonad m, Functor m, Default hint, MonadReader TypeGraphInfo m) => m (GraphEdges hint TypeGraphVertex)
- simpleEdges :: Monoid hint => GraphEdges hint TypeGraphVertex -> GraphEdges hint TypeGraphVertex
- simpleVertex :: TypeGraphVertex -> TypeGraphVertex
Documentation
fieldVertices :: MonadReader TypeGraphInfo m => TypeGraphVertex -> m (Set TypeGraphVertex) Source
Build the vertices that involve a particular type - if the field is specified it return s singleton, otherwise it returns a set containing a vertex one for the type on its own, and one for each field containing that type.
allVertices :: (Functor m, DsMonad m, MonadReader TypeGraphInfo m) => Maybe Field -> E Type -> m (Set TypeGraphVertex) Source
vertex :: forall m. (DsMonad m, MonadReader TypeGraphInfo m) => Maybe Field -> E Type -> m TypeGraphVertex Source
typeVertex :: MonadReader TypeGraphInfo m => E Type -> m TypeGraphVertex Source
Build a non-field vertex
fieldVertex :: MonadReader TypeGraphInfo m => E Type -> Field -> m TypeGraphVertex Source
Build a vertex associated with a field
typeGraphEdges :: forall hint m. (DsMonad m, Functor m, Default hint, MonadReader TypeGraphInfo m) => m (GraphEdges hint TypeGraphVertex) Source
Given the discovered set of types and maps of type synonyms and fields, build and return the GraphEdges relation on TypeGraphVertex. This is not a recursive function, it stops when it reaches the field types.
simpleEdges :: Monoid hint => GraphEdges hint TypeGraphVertex -> GraphEdges hint TypeGraphVertex Source
Simplify a graph by throwing away the field information in each node. This means the nodes only contain the fully expanded Type value (and any type synonyms.)