Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype MkTypename = MkTypename {
- runMkTypename :: Name -> Name
- withTypenameCustomization :: forall m r a. (MonadReader r m, Has MkTypename r) => MkTypename -> m a -> m a
- mkTypename :: (MonadReader r m, Has MkTypename r) => Name -> m Name
Documentation
newtype MkTypename Source #
Type name customization
MkTypename | |
|
Instances
Semigroup MkTypename Source # | |
Defined in Hasura.GraphQL.Schema.Typename (<>) :: MkTypename -> MkTypename -> MkTypename # sconcat :: NonEmpty MkTypename -> MkTypename # stimes :: Integral b => b -> MkTypename -> MkTypename # | |
Monoid MkTypename Source # | |
Defined in Hasura.GraphQL.Schema.Typename mempty :: MkTypename # mappend :: MkTypename -> MkTypename -> MkTypename # mconcat :: [MkTypename] -> MkTypename # |
withTypenameCustomization :: forall m r a. (MonadReader r m, Has MkTypename r) => MkTypename -> m a -> m a Source #
Inject a new MkTypename
customization function into the environment.
This can be used by schema-building code (with MonadBuildSchema
constraint) to ensure
the correct type name customizations are applied.
mkTypename :: (MonadReader r m, Has MkTypename r) => Name -> m Name Source #
Apply the type name customization function from the current environment.