@@ -9,6 +9,7 @@ Maintainer : The Idris Community.
9module IRTS.Portable (writePortable) where
9module IRTS.Portable (writePortable) where
11import Idris.Core.CaseTree
11import Idris.Core.CaseTree
12+import Idris.Core.Evaluate
12import Idris.Core.TT
13import Idris.Core.TT
13import IRTS.Bytecode
14import IRTS.Bytecode
14import IRTS.CodegenCommon
15import IRTS.CodegenCommon
@@ -53,7 +54,8 @@ instance ToJSON CodegenInfo where
53 "lift-decls" .= (liftDecls ci),
54 "lift-decls" .= (liftDecls ci),
54 "defun-decls" .= (defunDecls ci),
55 "defun-decls" .= (defunDecls ci),
55 "simple-decls" .= (simpleDecls ci),
56 "simple-decls" .= (simpleDecls ci),
56− "bytecode" .= (map toBC (simpleDecls ci))]
57+ "bytecode" .= (map toBC (simpleDecls ci)),
58+ "tt-decls" .= (ttDecls ci)]
58instance ToJSON Name where
60instance ToJSON Name where
59 toJSON n = toJSON $ showCG n
61 toJSON n = toJSON $ showCG n
@@ -279,3 +281,18 @@ instance ToJSON Reg where
279 toJSON (T i) = object ["T" .= i]
281 toJSON (T i) = object ["T" .= i]
280 toJSON (L i) = object ["L" .= i]
282 toJSON (L i) = object ["L" .= i]
281 toJSON Tmp = object ["Tmp" .= Null]
283 toJSON Tmp = object ["Tmp" .= Null]
285+instance ToJSON RigCount where
286+ toJSON r = object ["RigCount" .= show r]
288+instance ToJSON Totality where
289+ toJSON t = object ["Totality" .= show t]
291+instance ToJSON MetaInformation where
292+ toJSON m = object ["MetaInformation" .= show m]
294+instance ToJSON Def where
295+ toJSON d = object ["Def" .= show d]
297+instance ToJSON Accessibility where
298+ toJSON a = object ["Accessibility" .= show a]