Verified Commit c4b1f325 authored by Camil Staps's avatar Camil Staps 🚀

Add ProblemResult (see clean-cloogle/cloogle.org#148)

parent 132f72d7
...@@ -52,6 +52,7 @@ from GenEq import generic gEq ...@@ -52,6 +52,7 @@ from GenEq import generic gEq
| ClassResult ClassResult //* A class definition | ClassResult ClassResult //* A class definition
| ModuleResult ModuleResult //* A module | ModuleResult ModuleResult //* A module
| SyntaxResult SyntaxResult //* A Clean language syntax element | SyntaxResult SyntaxResult //* A Clean language syntax element
| 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
...@@ -198,6 +199,17 @@ from GenEq import generic gEq ...@@ -198,6 +199,17 @@ from GenEq import generic gEq
, cleanjs_start :: Maybe String //* The state in which clean.js should start highlighting , cleanjs_start :: Maybe String //* The state in which clean.js should start highlighting
} }
/**
* 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)
, problem_title :: String //* The problem title
, problem_description :: String //* A concise description
, problem_solutions :: [String] //* Possible solutions
, problem_examples :: [String] //* A number of examples
}
/** /**
* A location in a Clean library * A location in a Clean library
* *
......
...@@ -20,11 +20,11 @@ import GenEq ...@@ -20,11 +20,11 @@ import GenEq
derive JSONEncode Request, Response, Result, ShortClassResult, BasicResult, derive JSONEncode Request, Response, Result, ShortClassResult, BasicResult,
FunctionResultExtras, TypeResultExtras, ClassResultExtras, FunctionKind, FunctionResultExtras, TypeResultExtras, ClassResultExtras, FunctionKind,
ModuleResultExtras, SyntaxResultExtras, SyntaxExample, ModuleResultExtras, SyntaxResultExtras, SyntaxExample, ProblemResult,
CleanLangReportLocation, StrUnifier CleanLangReportLocation, StrUnifier
derive JSONDecode Request, Response, Result, ShortClassResult, BasicResult, derive JSONDecode Request, Response, Result, ShortClassResult, BasicResult,
FunctionResultExtras, TypeResultExtras, ClassResultExtras, FunctionKind, FunctionResultExtras, TypeResultExtras, ClassResultExtras, FunctionKind,
ModuleResultExtras, SyntaxResultExtras, SyntaxExample, ModuleResultExtras, SyntaxResultExtras, SyntaxExample, ProblemResult,
CleanLangReportLocation, StrUnifier CleanLangReportLocation, StrUnifier
derive gEq FunctionKind derive gEq FunctionKind
......
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