This commit is contained in:
crumbtoo
2024-04-24 13:10:26 -06:00
parent 3c234e6002
commit 6f5c7ee284
6 changed files with 194 additions and 20 deletions

View File

@@ -30,6 +30,7 @@ import Control.Lens hiding ((.=))
import Compiler.RLPC
import Compiler.JustRun
import GM
-- import Misc.CofreeF
-- import Rlp.AltSyntax
@@ -62,7 +63,7 @@ instance FromJSON Command where
data Response = Annotated Value
| PartiallyAnnotated Value
| Evaluated Value
| Evaluated [GmState]
| Error Value
deriving (Generic)
deriving (ToJSON)
@@ -87,5 +88,5 @@ respond (Annotate s)
respond (Evaluate s)
= justLexParseGmEval (T.unpack s)
& either (Error . toJSON) (Evaluated . toJSON)
& either (Error . toJSON) Evaluated