TheoremQuest.Transactions
Documentation
Requests from client to server.
Constructors
Ping | Ping server. |
NewUser User Email | New user: username, email. |
RspInJSON Req | Send response in JSON. |
Inference User (Inference TheoremId) | Submit an inference. Server will validate the inference and return a theorem. |
TheoremAssumptions TheoremId | Request a theorem's assumptions. |
TheoremConclusion TheoremId | Request a theorem's conclusion. |
TheoremSearch Term Int | Search for a theorem similar to a term. Return a list of ids starting at the given index. |
Responses to client requests.
Constructors
DeprecatedReq Rsp | A warning to clients that the associated |
UnknownReq | Server did not recognize |
Ack | Acknowledge. |
Nack String | No acknowledge with reason. |
Id Int | A unique id. Usually a |
Ids [Int] | A list of unique ids. |
Term Term | A term. |
Terms [Term] | A list of terms. |
formatJSON :: JSON a => a -> ([Header], String)Source
HTTP headers and body for JSON transfer.
formatText :: String -> ([Header], String)Source
HTTP headers and body for text transfer.
formatHaskell :: Show a => a -> ([Header], String)Source
HTTP headers and body for shown Haskell type transfer.