Some work reaches outside a pure value. A program may ask the clock, read config, print text, or call a host function. Musi keeps this kind of work visible.
An effect names work that needs an answer from outside the current expression. ask performs that work. answer, handle, and resume describe what happens next.
This part teaches effects, requirements, handlers, runtime modules, and library modules. The page examples show where outside work enters the code.
Use this part when your program must talk to the world.
Chapters
Effects and runtime
Chapter»EffectsAn effect names an operation that asks for an answer from outside normal value flow.Chapter»RequirementsA requirement makes needed ability visible near the function.Chapter»Ask, answer, handle
ask performs an effect operation. A handler can answer and resume.Chapter»Runtime modulesRuntime modules help code read values from the running environment.Chapter»Foundation and standard librarySome modules provide core names. Standard library modules provide common app tools.