Safe Haskell | None |
---|---|
Language | Haskell2010 |
- datatypesTool :: APITool
- datatypesTool' :: (APINode -> [Name]) -> APITool
- defaultDerivedClasses :: APINode -> [Name]
- type_nm :: APINode -> Name
- rep_type_nm :: APINode -> Name
- nodeT :: APINode -> TypeQ
- nodeRepT :: APINode -> TypeQ
- nodeConE :: APINode -> ExpQ
- nodeNewtypeConE :: ToolSettings -> APINode -> SpecNewtype -> ExpQ
- nodeFieldE :: APINode -> FieldName -> ExpQ
- nodeFieldP :: APINode -> FieldName -> PatQ
- nodeAltConE :: APINode -> FieldName -> ExpQ
- nodeAltConP :: APINode -> FieldName -> [PatQ] -> PatQ
- newtypeProjectionE :: APINode -> ExpQ
Documentation
datatypesTool :: APITool Source #
Tool to generate datatypes and type synonyms corresponding to an API
datatypesTool' :: (APINode -> [Name]) -> APITool Source #
Tool to generate datatypes and type synonyms corresponding to an API, where the function specifies the derived classes for each datatype.
defaultDerivedClasses :: APINode -> [Name] Source #
Default names of classes for which to derive instances, depending on the type of API node.
rep_type_nm :: APINode -> Name Source #
Name of the representation type corresponding to the API node,
which differs from the type_nm
only if custom conversion
functions are specified. This is also the name of the sole
constructor for newtypes and records.
nodeNewtypeConE :: ToolSettings -> APINode -> SpecNewtype -> ExpQ Source #
The constructor for a newtype, which might be renamed
nodeAltConE :: APINode -> FieldName -> ExpQ Source #
A prefixed constructor for a union or enum, as an expression
nodeAltConP :: APINode -> FieldName -> [PatQ] -> PatQ Source #
A prefixed constructor for a union or enum, as a pattern
newtypeProjectionE :: APINode -> ExpQ Source #
The projection function from a newtype API node, as an epxression