api-tools-0.4: DSL for generating API boilerplate and docs

Safe HaskellNone

Data.API.Tools.Datatypes

Synopsis

Documentation

datatypesTool :: APIToolSource

Tool to generate datatypes and type synonyms corresponding to an API

type_nm :: APINode -> NameSource

Name of the type corresponding to the API node, e.g. JobId

rep_type_nm :: APINode -> NameSource

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.

nodeT :: APINode -> TypeQSource

The type corresponding to an API node

nodeRepT :: APINode -> TypeQSource

The representation type corresponding to an API node

nodeConE :: APINode -> ExpQSource

The constructor for a newtype or record API node

nodeFieldE :: APINode -> FieldName -> ExpQSource

A record field in an API node, as an expression

nodeAltConE :: APINode -> FieldName -> ExpQSource

A prefixed constructor for a union or enum, as an expression

nodeAltConP :: APINode -> FieldName -> [PatQ] -> PatQSource

A prefixed constructor for a union or enum, as a pattern

newtypeProjectionE :: APINode -> ExpQSource

The projection function from a newtype API node, as an epxression