summaryrefslogtreecommitdiff
path: root/src/Language/Fiddle/GenericTree.hs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-08-24 13:55:41 -0600
committerJosh Rahm <joshuarahm@gmail.com>2024-08-24 13:55:41 -0600
commitf1128c7c60809d1e96009eaed98c0756831fe29f (patch)
tree3cc1957c7436e9efb1d26548b285fa3449574c3a /src/Language/Fiddle/GenericTree.hs
parent21f879cf2ac5f51f827fe76c55915e56edc113b8 (diff)
downloadfiddle-f1128c7c60809d1e96009eaed98c0756831fe29f.tar.gz
fiddle-f1128c7c60809d1e96009eaed98c0756831fe29f.tar.bz2
fiddle-f1128c7c60809d1e96009eaed98c0756831fe29f.zip
Add Stage3 compliation.
I think this is the last phase before sending the refined AST to the backend compiler to be processed.
Diffstat (limited to 'src/Language/Fiddle/GenericTree.hs')
-rw-r--r--src/Language/Fiddle/GenericTree.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Language/Fiddle/GenericTree.hs b/src/Language/Fiddle/GenericTree.hs
index b17954f..668c290 100644
--- a/src/Language/Fiddle/GenericTree.hs
+++ b/src/Language/Fiddle/GenericTree.hs
@@ -66,8 +66,8 @@ instance ToJSON SourcePos where
instance (Foldable f, ToJSON a) => ToJSON (GenericSyntaxTree f a) where
toJSON = \case
- (SyntaxTreeObject typ membs a t) ->
- object ["_type" .= show (typeOf t), "_con" .= typ, "_members" .= membs, "_annot" .= a]
+ (SyntaxTreeObject typ membs a _) ->
+ object ["_con" .= typ, "_members" .= membs, "_annot" .= a]
(SyntaxTreeList l) ->
Array $ Data.Vector.fromList $ map toJSON l
(SyntaxTreeDeferred fdef) ->
@@ -172,7 +172,7 @@ instance (GToGenericSyntaxTree r f a) => (GToGenericSyntaxTree (M1 i c r) f a) w
-- deriving instance (ToGenericSyntaxTree (Test stage))
-deriving instance (Context stage) => (ToGenericSyntaxTree (Identifier stage))
+deriving instance (ToGenericSyntaxTree Identifier)
deriving instance (Context stage) => (ToGenericSyntaxTree (FiddleUnit stage))
@@ -219,7 +219,7 @@ instance (Context stage) => (ToGenericSyntaxTree (ObjTypeDecl stage)) where
deriving instance (ToGenericSyntaxTreeValue ModifierKeyword)
-deriving instance (Context stage) => (ToGenericSyntaxTree (Modifier stage))
+deriving instance (ToGenericSyntaxTree Modifier)
deriving instance (Context stage) => (ToGenericSyntaxTree (DeferredRegisterBody stage))