From 3ceedaf5f5193fadadcb011c40df1688cfed279d Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sat, 5 Oct 2024 17:13:26 -0600 Subject: Implement qualification. Big change. Implements qualification, which separates the qualification concerns from the ConsistencyCheck phase. I'm getting close to implementing a backend. --- src/Language/Fiddle/Compiler/ImportResolution.hs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/Language/Fiddle/Compiler/ImportResolution.hs') diff --git a/src/Language/Fiddle/Compiler/ImportResolution.hs b/src/Language/Fiddle/Compiler/ImportResolution.hs index 4d4bd32..b475801 100644 --- a/src/Language/Fiddle/Compiler/ImportResolution.hs +++ b/src/Language/Fiddle/Compiler/ImportResolution.hs @@ -124,9 +124,6 @@ deriving instance (AdvanceStage CurrentStage t) => AdvanceStage CurrentStage (Di deriving instance AdvanceStage CurrentStage FiddleDecl -diagnosticError :: String -> Annot -> Compile a () -diagnosticError str a = tell [Diagnostic Error str (unCommented a)] - instance AdvanceStage CurrentStage ImportStatement where advanceStage s (ImportStatement path list _ a) = do let what = Map.lookup path (importMap s) @@ -134,7 +131,7 @@ instance AdvanceStage CurrentStage ImportStatement where v <- case what of Nothing -> do - diagnosticError "Failed to lookup imports (This is a bug)" a + emitDiagnosticError "Failed to lookup imports (This is a bug)" a return empty Just (diags, val) -> do tell diags -- cgit