HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduleinspection-testing-0.6.3Haskell2010

Test.Inspection.Core

This module implements some analyses of Core expressions necessary for Test.Inspection. Normally, users of this package can ignore this module.

Synopsis
valueslice :: [(Var, CoreExpr)] -> Var -> Slice

Selects those bindings that define the given variable (with this variable first)

valueeqSlice :: Equivalence -> Slice -> Slice -> Bool

This is a heuristic, which only works if both slices have auxiliary variables in the right order. (This is mostly to work-around the buggy CSE in GHC-8.0) It also breaks if there is shadowing.

valuedoesNotAllocate :: Slice -> Maybe (Var, CoreExpr)

True if the given variable binding does not allocate, if called fully satisfied.

It currently does not look through function calls, which of course could allocate. It should probably at least look through local function calls.

The variable is important to know the arity of the function.