CurryInfo: verify-non-fail-2.0.0 / FlatCurry.NormalizeLet.normalizeLet

definition: Info
 
normalizeLet :: Expr -> Expr
normalizeLet exp = case exp of
  Var _         -> exp
  Lit _         -> exp
  Comb ct qf es -> Comb ct qf (map normalizeLet es)
  Let bs e      -> foldr Let e (sortLetBindings bs)
  Free vs e     -> Free vs (normalizeLet e)
  Or e1 e2      -> Or (normalizeLet e1) (normalizeLet e2)
  Case ct be bs -> Case ct (normalizeLet be)
                        (map (\ (Branch p e) -> Branch p (normalizeLet e)) bs)
  Typed e t     -> Typed (normalizeLet e) t
demand: Info
 argument 1
deterministic: Info
 deterministic operation
documentation: Info
 
Normalize all let expressions occurring in an expression
by transforming each let expression into a hierarchical let expression
according to the dependencies of the bindings.
For instance,

    let { x = f y ; y = g z} in e

is transformed into

    let { y = g z} in let { x = f y} in e
failfree: Info
 <FAILING>
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {({Var}) |-> {Var} || ({Lit}) |-> {Lit} || ({Comb}) |-> {Comb} || ({Let}) |-> _ || ({Free}) |-> {Free} || ({Or}) |-> {Or} || ({Case}) |-> {Case} || ({Typed}) |-> {Typed}}
name: Info
 normalizeLet
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 FlatCurry.Types.Expr -> FlatCurry.Types.Expr
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term