git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Remove unused FixityDeclarations in DCE
commit2b2e37182800161c649040d5e2446e3a93916a34 authorGary Burgess <gary.burgess@gmail.com> dateThu 3 Apr 2014, 20:50 (13 years ago) parentff0c4be
1 file changed+3
src/Language/PureScript/DeadCodeElimination.hs+3
src/Language/PureScript/DeadCodeElimination.hs+3
@@ -86,6 +86,9 @@ isUsed :: ModuleName -> Graph -> (Key -> Maybe Vertex) -> [Vertex] -> Declaratio
8686isUsed moduleName graph vertexFor entryPointVertices (ValueDeclaration name _ _ _ _) =
8787 let Just v' = vertexFor (moduleName, Left name)
8888 in any (\v -> path graph v v') entryPointVertices
89+isUsed moduleName graph vertexFor entryPointVertices (FixityDeclaration _ name) =
90+ let Just v' = vertexFor (moduleName, Left $ Op name)
91+ in any (\v -> path graph v v') entryPointVertices
8992isUsed moduleName graph vertexFor entryPointVertices (DataDeclaration _ _ dctors) =
9093 any (\(pn, _) -> let Just v' = vertexFor (moduleName, Right pn)
9194 in any (\v -> path graph v v') entryPointVertices) dctors