ErrorTrap = "$trap" Path "$with" PatternAlternative.
$trap Q $with Palt
Ge : Paltis evaluated, and the result obtained is taken to be the result of the whole construct.
The path Q is evaluated at the level 0.
Env,0,St |- Q => Ge,St' ---------------------------------------- Env,m,St |- $trap Q $with Palt => Ge,St' Env,0,St |- Q => $fail(k),St' Env,m,St' |- Fname "Unexpected fail" : Palt => X,St'' ----------------------------------------------------- Env,m,St |- $trap Q $with Palt => X,St'' Fname is the name of the function in which the construct appears. Env,0,St |- Q => $error(Ge),St' Env,m,St' |- Ge : Palt => X,St'' ---------------------------------------- Env,m,St |- $trap Q $with Palt => X,St''