From 3fc6bee1a1359a68b77a6f11ed70bdcb88027da2 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Thu, 3 Oct 2024 11:13:13 -0600 Subject: Change the UnitInterface to have uncoupled Metadata. As opposed to the original 'Annotated' data type. --- src/Language/Fiddle/Compiler/ConsistencyCheck.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 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 abfbb9b..e081122 100644 --- a/src/Language/Fiddle/Compiler/ConsistencyCheck.hs +++ b/src/Language/Fiddle/Compiler/ConsistencyCheck.hs @@ -142,7 +142,7 @@ instance AdvanceStage Expanded ImportStatement where where unitInterfaceScopeToGlobalScope = fmap - ( \(Annotated _ _ exportedValue) -> case exportedValue of + ( \(_, exportedValue) -> case exportedValue of ExportedBitsType sz -> Left sz ExportedObjType sz -> Right sz ) @@ -597,7 +597,12 @@ insertIntoUnitInterface path ui (Commented comments srcspan) val = ) in ui { rootScope = - insertScope path (Annotated srcspan docComments val) (rootScope ui) + insertScope + path + ( Metadata srcspan docComments [], + val + ) + (rootScope ui) } insertTypeSize :: -- cgit