f = (case a of
        Just values -> b
        _           -> c)

reachable roots heap = go mempty roots
  where go seen set = case liveSplit set of
          Nothing -> seen
          Just (a, as) -> go (liveInsert a seen) (case heapLookupAll a heap of
            Just values -> liveDifference (foldr ((<>) . valueRoots) mempty values <> as) seen
            _           -> seen)

  analyzeTerm eval term = resumeException @(EvalError value) (liftAnalyze analyzeTerm eval term) (
        \yield (FreeVariableError name) ->
            raise (modify' (name :)) >> unit >>= yield)

  analyzeModule = liftAnalyze analyzeModule


Verify this tree:


insertVertexName name = do
    ms <- askModuleStack
    let parent = maybe empty (vertex . moduleName) (listToMaybe ms)
    modifyImportGraph (parent >< vertex name <>)

    (function_application [8, 4] - [8, 48]
             (variable_identifier [8, 4] - [8, 21])
             (parenthesized_expression [8, 22] - [8, 48]
               (infix_operator_application [8, 23] - [8, 47]
                 (variable_identifier [8, 23] - [8, 29])
                 (variable_operator [8, 30] - [8, 32]
                   (variable_symbol [8, 30] - [8, 32]))
                 (infix_operator_application [8, 33] - [8, 47]
                   (function_application [8, 33] - [8, 44]
                     (variable_identifier [8, 33] - [8, 39])
                     (variable_identifier [8, 40] - [8, 44]))
                   (variable_operator [8, 45] - [8, 47]
                     (variable_symbol [8, 45] - [8, 47]))))))))))

specifically: is the infix operator application in the last position accurate?



What is this syntax in `Analysis.Abstract.Dead`:

-- | Revive a single term, removing it from the current 'Dead' set.
revive :: (Effectful m, Member (State (Dead term)) effects) => Ord term => term -> DeadCode m effects ()
revive t = raise (modify (Dead . delete t . unDead))


declarationSummary :: (HasField fields (Maybe Declaration), HasField fields Span) => Text -> Record fields -> Maybe SymbolDeclaration
declarationSummary module' record = case getDeclaration record of
  Just declaration | FunctionDeclaration{} <- declaration -> Just (makeSymbolDeclaration declaration)
                   | MethodDeclaration{} <- declaration -> Just (makeSymbolDeclaration declaration)
  _ -> Nothing
  where makeSymbolDeclaration declaration = SymbolDeclaration
          { declarationName = declarationIdentifier declaration
          , declarationKind = toCategoryName declaration
          , declarationSpan = getField record
          , declarationModule = module'
          }
