summaryrefslogtreecommitdiff
path: root/src/Language/Fiddle/Compiler/ConsistencyCheck.hs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-10-03 12:58:38 -0600
committerJosh Rahm <joshuarahm@gmail.com>2024-10-03 12:58:38 -0600
commit5d0b8e6371d1e365ff9b10e0160a39f0f1d9f359 (patch)
tree7a4afc937e94365e486bf978dc7d91e5a20ef04e /src/Language/Fiddle/Compiler/ConsistencyCheck.hs
parentae5ea355a32eff2b1b1762f4ac2389d94f388df7 (diff)
downloadfiddle-5d0b8e6371d1e365ff9b10e0160a39f0f1d9f359.tar.gz
fiddle-5d0b8e6371d1e365ff9b10e0160a39f0f1d9f359.tar.bz2
fiddle-5d0b8e6371d1e365ff9b10e0160a39f0f1d9f359.zip
Make changes to AST for qualification step.
Diffstat (limited to 'src/Language/Fiddle/Compiler/ConsistencyCheck.hs')
-rw-r--r--src/Language/Fiddle/Compiler/ConsistencyCheck.hs14
1 files changed, 7 insertions, 7 deletions
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,)