diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-10-05 17:13:26 -0600 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-10-05 17:13:26 -0600 |
commit | 3ceedaf5f5193fadadcb011c40df1688cfed279d (patch) | |
tree | 772c8a0c607d68e287addc59bdde71172edd10b1 /src/Language/Fiddle/Compiler/ImportResolution.hs | |
parent | 407e41489cc22fbf0518fd370530f8857b8c3ed0 (diff) | |
download | fiddle-3ceedaf5f5193fadadcb011c40df1688cfed279d.tar.gz fiddle-3ceedaf5f5193fadadcb011c40df1688cfed279d.tar.bz2 fiddle-3ceedaf5f5193fadadcb011c40df1688cfed279d.zip |
Implement qualification.
Big change. Implements qualification, which separates the qualification
concerns from the ConsistencyCheck phase.
I'm getting close to implementing a backend.
Diffstat (limited to 'src/Language/Fiddle/Compiler/ImportResolution.hs')
-rw-r--r-- | src/Language/Fiddle/Compiler/ImportResolution.hs | 5 |
1 files changed, 1 insertions, 4 deletions
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 |