Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains useful methods to work with the defined types (both from the language
specification/bnfc and the ApiSpec
module).
- specName :: Specification -> String
- specVersion :: Specification -> String
- enumName :: EnumType -> String
- enumVals :: EnumType -> [EnumVal]
- enumValName :: EnumVal -> String
- strName :: StructType -> String
- strFields :: StructType -> [Field]
- resName :: Resource -> String
- resRoute :: Resource -> String
- resIsWritable :: Resource -> Bool
- fieldName :: Field -> String
- fieldAnnotations :: Field -> [Annotation]
- fieldType :: Field -> FType
- fieldSpecType :: (Set String, Set String) -> FType -> Type
Documentation
:: Specification | Specification returned by the parser |
-> String | Name of the specification |
Extracts the name of the Specification
(AST).
:: Specification | Specification returned by the parser |
-> String | Version of the specification |
Extracts the version of the Specification
(AST).
Extracts the name of an enum.
Extracts the values of an enum.
:: StructType | The struct info |
-> String | The name of the struct |
Extracts the name of a struct.
:: StructType | Struct info |
-> [Field] | List of fields of the struct |
Extracts the fields of a struct.
Extracts the name of a resource.
Extracts the route of a resource.
Extracts the write mode of a resource.
:: Field | Field information |
-> [Annotation] | List of annotations |
Extracts the annotation of a field.
Extracts the type (defined by the language specification/bnfc) of a field.