Skip to content

Commit

Permalink
Fix bug in symbol dependency graph generation in Core (#3018)
Browse files Browse the repository at this point in the history
The graph was missing some edges, which led to too many symbols being
filtered out by the `filter-unreachable` transformation.
  • Loading branch information
lukaszcz authored Sep 11, 2024
1 parent 5d0aa6e commit 5d3550b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Commands/Dev/DevCompile/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Juvix.Compiler.Core.Pretty
import Juvix.Compiler.Core.Transformation qualified as Core

compileTransformations :: [Core.TransformationId]
compileTransformations = [Core.CombineInfoTables, Core.FilterUnreachable, Core.DisambiguateNames]
compileTransformations = [Core.CombineInfoTables, Core.DisambiguateNames, Core.FilterUnreachable]

runCommand ::
forall r.
Expand Down
2 changes: 1 addition & 1 deletion src/Juvix/Compiler/Core/Data/IdentDependencyInfo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ createSymbolDependencyInfo tab = createDependencyInfo graph startVertices
(tab ^. infoIdentifiers)
<> foldr
( \ConstructorInfo {..} ->
HashMap.insert _constructorInductive (getSymbols' tab _constructorType)
HashMap.insertWith (<>) _constructorInductive (getSymbols' tab _constructorType)
)
mempty
(tab ^. infoConstructors)
Expand Down

0 comments on commit 5d3550b

Please sign in to comment.