Safe Haskell | None |
---|---|
Language | Haskell2010 |
Lorentz.Annotation
Description
Type and field annotations for Lorentz types.
Synopsis
- data FollowEntrypointFlag
- data GenerateFieldAnnFlag
- class HasAnnotation a where
- getAnnotation :: FollowEntrypointFlag -> Notes (ToT a)
- class GHasAnnotation a where
- gGetAnnotation :: FollowEntrypointFlag -> GenerateFieldAnnFlag -> (Notes (GValueType a), FieldAnn)
- gGetAnnotationNoField :: forall a. (GHasAnnotation (Rep a), GValueType (Rep a) ~ ToT a) => FollowEntrypointFlag -> Notes (ToT a)
- insertTypeAnn :: forall (b :: T). TypeAnn -> Notes b -> Notes b
Documentation
data FollowEntrypointFlag Source #
Used in GHasAnnotation
and HasAnnotation
as a flag to track
whether or not it directly follows an entrypoint to avoid introducing
extra entrypoints.
Constructors
FollowEntrypoint | |
NotFollowEntrypoint |
data GenerateFieldAnnFlag Source #
Used in GHasAnnotation
as a flag to track whether or not field/constructor
annotations should be generated.
Constructors
GenerateFieldAnn | |
NotGenerateFieldAnn |
class HasAnnotation a where Source #
This class defines the type and field annotations for a given type. Right now the type annotations come from names in a named field, and field annotations are generated from the record fields.
Minimal complete definition
Nothing
Methods
getAnnotation :: FollowEntrypointFlag -> Notes (ToT a) Source #
default getAnnotation :: (GHasAnnotation (Rep a), GValueType (Rep a) ~ ToT a) => FollowEntrypointFlag -> Notes (ToT a) Source #
Instances
class GHasAnnotation a where Source #
A Generic HasAnnotation
implementation
Methods
gGetAnnotation :: FollowEntrypointFlag -> GenerateFieldAnnFlag -> (Notes (GValueType a), FieldAnn) Source #
Instances
gGetAnnotationNoField :: forall a. (GHasAnnotation (Rep a), GValueType (Rep a) ~ ToT a) => FollowEntrypointFlag -> Notes (ToT a) Source #
Use this in the instance of HasAnnotation
when field annotations
should not be generated.
insertTypeAnn :: forall (b :: T). TypeAnn -> Notes b -> Notes b #