Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- shrinkEnv ∷ DependGraph era → Env era → [Env era]
Documentation
shrinkEnv ∷ DependGraph era → Env era → [Env era] Source #
Shrink an environment subject to the constraints in the given dependency graph. The strategy is * pick a variable * shrink its value to something that still satisfies the defining constraints for the variable * adjust the values for variables depending on the picked variables to fix constraint violations resulting from the changed value Note that the DependGraph tells us the dependency order of the variables: a variable only depends on the variables before it in the graph, so when shrinking the value of a variable we only need to adjust the values of later variables.