package miaou-core
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=60a3b9f181f24572a06a9492532bfdda
sha512=fcc35a275066be2900e6201782faf47503076fa4640f08cf78067835a6f447b74613009e55b2ac799adb7ca46f1bffa261fc5971753f2cc3c6bef327511c7ef6
doc/miaou-core.internals/Miaou_internals/Key_handler_stack/index.html
Module Miaou_internals.Key_handler_stackSource
Pure hierarchical key handler stack (no global mutable state).
This module exposes an immutable stack value 't. All operations return a new stack instead of mutating hidden refs so the caller (driver) can thread it through its event loop state. This satisfies the requirement that the key stack is part of the overall application state.
Future extensions (e.g. actions pushing new frames) can be supported by enriching the action type to carry stack transformers. For now actions are simple callbacks (typically mutating page/modal state captured in closures).
opaque stack
reference id for later pop
Dispatch a key, returning (consumed, new_stack). New stack is identical for now (no structural change) but reserved for future evolving actions.
Return (key, help) pairs for the current top frame, preserving no ordering guarantees (hash table fold).