liveBook · Manning

Avatar

As explained in Functional Design and Architecture: Examples in Haskell

An avatar is a typed identifier representing an instantiated runtime object without containing the object itself.

An avatar is a typed identifier for an instantiated runtime object. It contains only an identifying name, not the controller itself, and replaces loosely checked string or constant references. section 5.2.2

Avatars improve an embedded DSL by making resource dependencies explicit:

  • Operations such as ReadSensor and GetStatus accept the avatar, preventing accidental use of a different controller name. section 5.2.2

How Functional Design and Architecture: Examples in Haskell covers it

How deep it goes
Defines avatars as name-only typed values and shows their propagation through continuations and dependent operations.
Examples
Uses left and right booster controllers, registered nozzle components, sensor measurements, and health-status reports.
What you can do after
Build typed controller scripts that prevent missing setup and mismatched controller references.
How it connects
Connects algebraic data types, embedded domain-specific languages, continuations, runtime instances, and type-safe resource references.

This explainer was generated by Manning's knowledge graph from the text of Functional Design and Architecture: Examples in Haskell. The section links point to the parts of the book it draws on.