Session bindings: a name mapped to one equation of a recursive
let spliced into every later block. Two provenances, matching
Haskell's own semantics: x <- e evaluates now and captures the
show-rendered *value* (effects run once, never replayed); let f x
= e (or bare f x = e) captures the *definition* verbatim — so
functions bind, and a spell bound by let is a recipe cast anew at
each use. Either way the environment is itself Haskell text, like
everything else on this wire.
Modulevortex-shell-0.4.1GHC2024
Vortex.Shell.Block
How a session's bindings reach the elaborator: wrapBindings puts them in scope around a block that vortex-elab's blockDo reads.
- 1 type
- 1 value
- Packagevortex-shell-0.4.1
- Exports2
- LanguageGHC2024
- LicenceBSD-3-Clause
- SourceBlock.hs
Put the bindings in scope around a block, as one recursive let
with explicit braces. The block is read by blockDo first and set on
lines of its own, every line indented one column, closing bracket
included: the whole wrapper is then one statement to the blockDo the
evaluator applies, which leaves it as written. A line of the wrapper
at column zero would start a statement of its own there, and GHC would
refuse the ; put before it.