| Copyright | © 2020-2026 Albert Krewinkel |
|---|---|
| License | MIT |
| Maintainer | Albert Krewinkel <tarleb@hslua.org> |
| Stability | alpha |
| Portability | Portable |
| Safe Haskell | None |
| Language | Haskell2010 |
HsLua.Packaging.Types
Description
Marshaling and documenting Haskell functions.
Synopsis
- data Module e = Module {
- moduleName :: Name
- moduleDescription :: Text
- moduleFields :: [Field e]
- moduleFunctions :: [DocumentedFunction e]
- moduleOperations :: [(Operation, DocumentedFunction e)]
- moduleTypeInitializers :: [LuaE e Name]
- moduleTypeDocs :: [TypeDoc]
- data Field e = Field {
- fieldName :: Name
- fieldDoc :: FieldDoc
- fieldPushValue :: LuaE e ()
- data DocumentedFunction e = DocumentedFunction {
- callFunction :: LuaE e NumResults
- functionName :: Name
- functionDoc :: FunctionDoc
- type DocumentedType e a = UDType e (DocumentedFunction e) a
- data DocumentationObject
- data ModuleDoc = ModuleDoc {
- moduleDocName :: Text
- moduleDocDescription :: Text
- moduleDocFields :: [FieldDoc]
- moduleDocFunctions :: [FunctionDoc]
- moduleDocTypes :: [TypeDoc]
- data FunctionDoc = FunDoc {
- funDocName :: Text
- funDocDescription :: Text
- funDocParameters :: [ParameterDoc]
- funDocResults :: ResultsDoc
- funDocSince :: Maybe Version
- data TypeDoc = TypeDoc {
- typeDocName :: Text
- typeDocDescription :: Text
- typeDocOperations :: [(Operation, FunctionDoc)]
- typeDocMethods :: [FunctionDoc]
- data ParameterDoc = ParameterDoc {
- parameterName :: Text
- parameterType :: TypeSpec
- parameterDescription :: Text
- parameterIsOptional :: Bool
- data ResultsDoc
- = ResultsDocList [ResultValueDoc]
- | ResultsDocMult Text
- data ResultValueDoc = ResultValueDoc {
- resultValueType :: TypeSpec
- resultValueDescription :: Text
- data FieldDoc = FieldDoc {
- fieldDocName :: Text
- fieldDocType :: TypeSpec
- fieldDocDescription :: Text
- class HasName a where
- class HasDescription a where
- getDescription :: a -> Text
- setDescription :: a -> Text -> a
Documented Lua objects
Named and documented Lua module.
Constructors
| Module | |
Fields
| |
Instances
| HasDescription (Module e) Source # | |
Defined in HsLua.Packaging.Types Methods getDescription :: Module e -> Text Source # setDescription :: Module e -> Text -> Module e Source # | |
| HasName (Module e) Source # | |
Self-documenting module field
Constructors
| Field | |
Fields
| |
Instances
| HasDescription (Field e) Source # | |
Defined in HsLua.Packaging.Types Methods getDescription :: Field e -> Text Source # setDescription :: Field e -> Text -> Field e Source # | |
| HasName (Field e) Source # | |
data DocumentedFunction e Source #
Haskell equivallent to CFunction, i.e., function callable from Lua.
Constructors
| DocumentedFunction | |
Fields
| |
Instances
| HasName (DocumentedFunction e) Source # | |
Defined in HsLua.Packaging.Types Methods getName :: DocumentedFunction e -> Name Source # setName :: DocumentedFunction e -> Name -> DocumentedFunction e Source # | |
type DocumentedType e a = UDType e (DocumentedFunction e) a Source #
Type definitions containing documented functions.
Documentation types
data DocumentationObject Source #
Documentation for any of the supported Lua objects.
Instances
| Show DocumentationObject Source # | |
Defined in HsLua.Packaging.Types Methods showsPrec :: Int -> DocumentationObject -> ShowS show :: DocumentationObject -> String showList :: [DocumentationObject] -> ShowS | |
| Eq DocumentationObject Source # | |
Defined in HsLua.Packaging.Types Methods (==) :: DocumentationObject -> DocumentationObject -> Bool (/=) :: DocumentationObject -> DocumentationObject -> Bool | |
| Ord DocumentationObject Source # | |
Defined in HsLua.Packaging.Types Methods compare :: DocumentationObject -> DocumentationObject -> Ordering (<) :: DocumentationObject -> DocumentationObject -> Bool (<=) :: DocumentationObject -> DocumentationObject -> Bool (>) :: DocumentationObject -> DocumentationObject -> Bool (>=) :: DocumentationObject -> DocumentationObject -> Bool max :: DocumentationObject -> DocumentationObject -> DocumentationObject min :: DocumentationObject -> DocumentationObject -> DocumentationObject | |
Module documentation
Constructors
| ModuleDoc | |
Fields
| |
Instances
| Show ModuleDoc Source # | |
| Eq ModuleDoc Source # | |
| Ord ModuleDoc Source # | |
Defined in HsLua.Packaging.Types | |
| HasDescription ModuleDoc Source # | |
Defined in HsLua.Packaging.Types Methods getDescription :: ModuleDoc -> Text Source # setDescription :: ModuleDoc -> Text -> ModuleDoc Source # | |
data FunctionDoc Source #
Documentation for a Haskell function
Constructors
| FunDoc | |
Fields
| |
Instances
| Show FunctionDoc Source # | |
Defined in HsLua.Packaging.Types Methods showsPrec :: Int -> FunctionDoc -> ShowS show :: FunctionDoc -> String showList :: [FunctionDoc] -> ShowS | |
| Eq FunctionDoc Source # | |
Defined in HsLua.Packaging.Types | |
| Ord FunctionDoc Source # | |
Defined in HsLua.Packaging.Types Methods compare :: FunctionDoc -> FunctionDoc -> Ordering (<) :: FunctionDoc -> FunctionDoc -> Bool (<=) :: FunctionDoc -> FunctionDoc -> Bool (>) :: FunctionDoc -> FunctionDoc -> Bool (>=) :: FunctionDoc -> FunctionDoc -> Bool max :: FunctionDoc -> FunctionDoc -> FunctionDoc min :: FunctionDoc -> FunctionDoc -> FunctionDoc | |
Documentation of a data type.
Constructors
| TypeDoc | |
Fields
| |
data ParameterDoc Source #
Documentation for function parameters.
Constructors
| ParameterDoc | |
Fields
| |
Instances
| Show ParameterDoc Source # | |
Defined in HsLua.Packaging.Types Methods showsPrec :: Int -> ParameterDoc -> ShowS show :: ParameterDoc -> String showList :: [ParameterDoc] -> ShowS | |
| Eq ParameterDoc Source # | |
Defined in HsLua.Packaging.Types | |
| Ord ParameterDoc Source # | |
Defined in HsLua.Packaging.Types Methods compare :: ParameterDoc -> ParameterDoc -> Ordering (<) :: ParameterDoc -> ParameterDoc -> Bool (<=) :: ParameterDoc -> ParameterDoc -> Bool (>) :: ParameterDoc -> ParameterDoc -> Bool (>=) :: ParameterDoc -> ParameterDoc -> Bool max :: ParameterDoc -> ParameterDoc -> ParameterDoc min :: ParameterDoc -> ParameterDoc -> ParameterDoc | |
data ResultsDoc Source #
Documentation for the return values of a function.
Constructors
| ResultsDocList [ResultValueDoc] | List of individual results |
| ResultsDocMult Text | Flexible results |
Instances
| Show ResultsDoc Source # | |
Defined in HsLua.Packaging.Types Methods showsPrec :: Int -> ResultsDoc -> ShowS show :: ResultsDoc -> String showList :: [ResultsDoc] -> ShowS | |
| Eq ResultsDoc Source # | |
Defined in HsLua.Packaging.Types | |
| Ord ResultsDoc Source # | |
Defined in HsLua.Packaging.Types Methods compare :: ResultsDoc -> ResultsDoc -> Ordering (<) :: ResultsDoc -> ResultsDoc -> Bool (<=) :: ResultsDoc -> ResultsDoc -> Bool (>) :: ResultsDoc -> ResultsDoc -> Bool (>=) :: ResultsDoc -> ResultsDoc -> Bool max :: ResultsDoc -> ResultsDoc -> ResultsDoc min :: ResultsDoc -> ResultsDoc -> ResultsDoc | |
data ResultValueDoc Source #
Documentation for a single return value of a function.
Constructors
| ResultValueDoc | |
Fields
| |
Instances
| Show ResultValueDoc Source # | |
Defined in HsLua.Packaging.Types Methods showsPrec :: Int -> ResultValueDoc -> ShowS show :: ResultValueDoc -> String showList :: [ResultValueDoc] -> ShowS | |
| Eq ResultValueDoc Source # | |
Defined in HsLua.Packaging.Types Methods (==) :: ResultValueDoc -> ResultValueDoc -> Bool (/=) :: ResultValueDoc -> ResultValueDoc -> Bool | |
| Ord ResultValueDoc Source # | |
Defined in HsLua.Packaging.Types Methods compare :: ResultValueDoc -> ResultValueDoc -> Ordering (<) :: ResultValueDoc -> ResultValueDoc -> Bool (<=) :: ResultValueDoc -> ResultValueDoc -> Bool (>) :: ResultValueDoc -> ResultValueDoc -> Bool (>=) :: ResultValueDoc -> ResultValueDoc -> Bool max :: ResultValueDoc -> ResultValueDoc -> ResultValueDoc min :: ResultValueDoc -> ResultValueDoc -> ResultValueDoc | |
Documentation for a module field.
Constructors
| FieldDoc | |
Fields
| |
Instances
| Show FieldDoc Source # | |
| Eq FieldDoc Source # | |
| Ord FieldDoc Source # | |
Defined in HsLua.Packaging.Types | |
| HasDescription FieldDoc Source # | |
Defined in HsLua.Packaging.Types Methods getDescription :: FieldDoc -> Text Source # setDescription :: FieldDoc -> Text -> FieldDoc Source # | |
Type classes
class HasName a where Source #
Named objects
Instances
| HasName (DocumentedFunction e) Source # | |
Defined in HsLua.Packaging.Types Methods getName :: DocumentedFunction e -> Name Source # setName :: DocumentedFunction e -> Name -> DocumentedFunction e Source # | |
| HasName (Field e) Source # | |
| HasName (Module e) Source # | |
class HasDescription a where Source #
Objects that have descriptions.
Instances
| HasDescription FieldDoc Source # | |
Defined in HsLua.Packaging.Types Methods getDescription :: FieldDoc -> Text Source # setDescription :: FieldDoc -> Text -> FieldDoc Source # | |
| HasDescription ModuleDoc Source # | |
Defined in HsLua.Packaging.Types Methods getDescription :: ModuleDoc -> Text Source # setDescription :: ModuleDoc -> Text -> ModuleDoc Source # | |
| HasDescription (Field e) Source # | |
Defined in HsLua.Packaging.Types Methods getDescription :: Field e -> Text Source # setDescription :: Field e -> Text -> Field e Source # | |
| HasDescription (Module e) Source # | |
Defined in HsLua.Packaging.Types Methods getDescription :: Module e -> Text Source # setDescription :: Module e -> Text -> Module e Source # | |