-
-
Save chadaustin/50f57a2698d5757b06ac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Scalar | |
= SInt Int32 | |
| SFloat Float | |
| SBoolean Bool | |
| SString Text | |
| SEnum Text -- unquoted on parse | |
data InputValue | |
= IVar Text | |
| IScalar Scalar | |
| IList [InputValue] | |
| IObject (HashMap Text InputValue) | |
data ResponseValue | |
= RNull | |
| RScalar Scalar | |
| RList [ResponseValue] | |
| RObject NodeHandler | |
data KeyHandler = KeyHandler (HashMap Text Main.Value -> IO ResponseValue) | |
data NodeHandler = NodeHandler (HashMap Text KeyHandler) | |
data Server = Server | |
{ rootQuery :: NodeHandler | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment