From 0a0f200a79a9e78b97addda6bd8e879d8c1c5d3e Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sat, 19 Oct 2024 02:36:56 -0600 Subject: Change the AST to use Names instead of Identifiers for ObjDecls and BitsDecls This is to make anonymous expansion better and cleaner. It gets rid of the hash-mark hack introduced earlier. --- src/Language/Fiddle/Ast/Internal/SyntaxTree.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Language/Fiddle/Ast/Internal') diff --git a/src/Language/Fiddle/Ast/Internal/SyntaxTree.hs b/src/Language/Fiddle/Ast/Internal/SyntaxTree.hs index 063913b..c539665 100644 --- a/src/Language/Fiddle/Ast/Internal/SyntaxTree.hs +++ b/src/Language/Fiddle/Ast/Internal/SyntaxTree.hs @@ -410,8 +410,9 @@ data FiddleDecl :: StagedSynTree where BitsDecl :: { -- | Qualification metadata about this "bits" declaration. bitsQualificationMetadata :: f (QMd stage ExportedBitsDecl), - -- | The identifier of the bits. - bitsIdent :: Identifier f a, + -- | The identifier of the bits. When initially parsed, this can only be + -- an Identifier, but during compilation this may change to a "name". + bitsName :: Name f a, -- | The type of the bits. bitsType :: BitType stage f a, -- | Annotation for the bits declaration. @@ -423,7 +424,7 @@ data FiddleDecl :: StagedSynTree where { -- | Qualification metadata about this object type. objTypeQualificationMetadata :: f (QMd stage ExportedTypeDecl), -- | The identifier of the object type. - objTypeIdent :: Identifier f a, + objTypeIdent :: Name f a, -- | The body of the object type. objTypeBody :: f (ObjTypeBody stage f a), -- | Annotation for the object type declaration. -- cgit