Verified Commit 1a13b248 authored by Camil Staps's avatar Camil Staps 🚀

Documentation

parent fd550136
......@@ -15,7 +15,7 @@ from Internet.HTTP import :: HTTPRequest
from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
/**
* A Cloogle request
* A Cloogle request.
*/
:: Request =
{ unify :: Maybe String //* Functions that unify with this type
......@@ -32,10 +32,10 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
}
/**
* A Cloogle response
* A Cloogle response.
*/
:: Response =
{ return :: Int //* A return code (use fromInt of CloogleError)
{ return :: Int //* A return code (use {{`fromInt`}} of {{`CloogleError`}})
, data :: [Result] //* The actual results
, msg :: String //* A human-readable message describing the return code
, more_available :: Maybe Int //* How many more results are available in next pages
......@@ -44,7 +44,7 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
}
/**
* A single Cloogle result
* A single Cloogle result.
*/
:: Result
= FunctionResult FunctionResult //* A normal function, macro, generic, class member, constructor or record field
......@@ -55,7 +55,7 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
| ProblemResult ProblemResult //* A common problem (see https://github.com/clean-cloogle/common-problems)
/**
* Basic data that is included in any Cloogle result
* Basic data that is included in any Cloogle result.
*/
:: BasicResult =
{ library :: String //* The library the entry was found in
......@@ -71,7 +71,7 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
}
/**
* A location in a Clean language report
* A location in a Clean language report.
*/
:: CleanLangReportLocation =
{ clr_version :: String //* The version of the report
......@@ -82,14 +82,14 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
/**
* Cloogle result about a function, generic, class member, constructor or
* record field
* record field.
*
* @representation A tuple of basic and function-specific data
*/
:: FunctionResult :== (BasicResult, FunctionResultExtras)
/**
* Different kind of Clean functions
* Different kinds of Clean functions.
*/
:: FunctionKind
= Function //* A normal function or generic
......@@ -100,7 +100,7 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
| ClassMacro //* A class macro
/**
* Function-specific Cloogle result data
* Function-specific Cloogle result data.
*/
:: FunctionResultExtras =
{ func :: String //* A string representation of the type
......@@ -119,14 +119,14 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
}
/**
* Cloogle result about a type definition
* Cloogle result about a type definition.
*
* @representation A tuple of basic and type-specific data
*/
:: TypeResult :== (BasicResult, TypeResultExtras)
/**
* Type-specific Cloogle result data
* Type-specific Cloogle result data.
*/
:: TypeResultExtras =
{ type :: String
......@@ -151,7 +151,7 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
:: ClassResult :== (BasicResult, ClassResultExtras)
/**
* Class-specific Cloogle result data
* Class-specific Cloogle result data.
*/
:: ClassResultExtras =
{ class_name :: String //* The name of the class
......@@ -162,28 +162,28 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
}
/**
* Cloogle result about a module
* Cloogle result about a module.
*
* @representation A tuple of basic and module-specific data
*/
:: ModuleResult :== (BasicResult, ModuleResultExtras)
/**
* Module-specific Cloogle result data
* Module-specific Cloogle result data.
*/
:: ModuleResultExtras =
{ module_is_core :: Bool //* Whether this module is part of a library core
}
/**
* Cloogle result about a Clean language construct
* Cloogle result about a Clean language construct.
*
* @representation A tuple of basic and construct-specific data
*/
:: SyntaxResult :== (BasicResult, SyntaxResultExtras)
/**
* Syntax contruct-specific Cloogle result data
* Syntax contruct-specific Cloogle result data.
*/
:: SyntaxResultExtras =
{ syntax_title :: String //* The name of the construct
......@@ -192,7 +192,7 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
}
/**
* An example of Clean syntax
* An example of Clean syntax.
*/
:: SyntaxExample =
{ example :: String //* The actual code
......@@ -201,7 +201,7 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
}
/**
* Cloogle result about a common problem (see https://github.com/clean-cloogle/common-problems)
* Cloogle result about a common problem (see https://github.com/clean-cloogle/common-problems).
*/
:: ProblemResult =
{ problem_key :: String //* The key (filename in the common-problems repo without extension)
......@@ -212,7 +212,7 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
}
/**
* A location in a Clean library
* A location in a Clean library.
*
* @representation The library, the module, the filename, the line in the
* definition module and the line in the implementation module
......@@ -220,7 +220,7 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
:: LocationResult :== (String, String, String, Maybe Int, Maybe Int)
/**
* A type unifier, represented with strings
* A type unifier, represented with strings.
*/
:: StrUnifier =
{ left_to_right :: [(String,String)] //* Transformations from request to response
......@@ -229,7 +229,7 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
}
/**
* Basic data about a class definition
* Basic data about a class definition.
*/
:: ShortClassResult =
{ cls_name :: String //* The name
......@@ -237,7 +237,7 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
}
/**
* A Cloogle Error
* A Cloogle Error.
*/
:: CloogleError
/* Cloogle system errors */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment