gibbon-0.3: A compiler for operating on serialized data
Safe HaskellSafe-Inferred
LanguageHaskell2010

Gibbon.Passes.AddTraversals

Synopsis

Documentation

needsTraversalCase :: DDefs Ty2 -> FunDefs2 -> Env2 Ty2 -> (DataCon, [(Var, LocVar)], Exp2) -> Maybe [(Var, LocVar)] Source #

Collect all non-static items that need to be traversed (uses InferEffects).

If we cannot unpack all the pattern matched variables: (1) Everything after the first packed element should be unused in the RHS (2) Otherwise, we must traverse the first (n-1) packed elements