From 5d0b8e6371d1e365ff9b10e0160a39f0f1d9f359 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Thu, 3 Oct 2024 12:58:38 -0600 Subject: Make changes to AST for qualification step. --- src/Language/Fiddle/Compiler/ConsistencyCheck.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/Language/Fiddle/Compiler/ConsistencyCheck.hs') diff --git a/src/Language/Fiddle/Compiler/ConsistencyCheck.hs b/src/Language/Fiddle/Compiler/ConsistencyCheck.hs index 2f570a4..7ca618b 100644 --- a/src/Language/Fiddle/Compiler/ConsistencyCheck.hs +++ b/src/Language/Fiddle/Compiler/ConsistencyCheck.hs @@ -159,18 +159,18 @@ deriving instance AdvanceStage CurrentStage FiddleDecl instance AdvanceStage CurrentStage (Directed FiddleDecl) where modifyState (Directed directives t _) s = case t of - (BitsDecl id typ annotation) -> do + (BitsDecl () id typ annotation) -> do typeSize <- getTypeSize typ insertTypeSize annotation s id typeSize return s - (PackageDecl n _ _) -> do + (PackageDecl () n _ _) -> do let strs = nameToList n let (LocalState scopePath) = s return $ LocalState $ scopePath {currentScope = strs ++ currentScope scopePath} - (UsingDecl n _) -> + (UsingDecl _ n _) -> let (LocalState scopePath) = s in return $ LocalState $ @@ -180,7 +180,7 @@ instance AdvanceStage CurrentStage (Directed FiddleDecl) where _ -> return s customAdvanceStage (Directed directives t a) (LocalState scopePath) = case t of - (ObjTypeDecl ident (Identity body) annot) -> do + (ObjTypeDecl () ident (Identity body) annot) -> do (body', size) <- objTypeBodyToStage3 (LocalState scopePath) body 0 let fullName = @@ -192,7 +192,7 @@ instance AdvanceStage CurrentStage (Directed FiddleDecl) where let ui' = insertIntoUnitInterface fullName ui annot (ExportedObjType size) modify' $ \gs -> gs {unitInterface = ui'} - return $ Just $ Directed directives (ObjTypeDecl ident (Identity body') annot) a + return $ Just $ Directed directives (ObjTypeDecl () ident (Identity body') annot) a _ -> return Nothing nameToList :: Name f a -> [String] @@ -456,8 +456,8 @@ registerBitsTypeRefToStage3 localState = \case ( RegisterBitsArray ref' expr' a, size * fromIntegral multiplier ) - RegisterBitsReference name a -> - (RegisterBitsReference name a,) <$> lookupTypeSize localState name + RegisterBitsReference () name a -> + (RegisterBitsReference () name a,) <$> lookupTypeSize localState name RegisterBitsJustBits expr a -> do expr' <- advanceStage localState expr (RegisterBitsJustBits expr' a,) -- cgit