-
-
Notifications
You must be signed in to change notification settings - Fork 0
Fragments
Fragments are the main data structure in the compiler used to represent code objects as they are rendered. A Fragment is modelled as a map from Strings to S-Expressions. Fragments are available transparently to the type-system, compiler, AND the programmer. Fragments may be used to model a wide variety of code objects, so the data structure is fundamentally dynamic. Dynamic pattern matching is then used by the rest of the compiler to manipulate these Fragments. Functions that manipulate Fragments are also exposed to the programmer within the rendering context. This interplay between dynamic and static objects creates the fundamental compilation unit throughout the entire compilation process.
A blob function is a function that will become a fragment directly when called.
Blob
can be annotated to any function as a calling convention.
The Blob calling convention can be described as an idiomatic "inline" calling convention.
f := λ: Blob(: x X). (
(:program x)
(:frame x)
(:unframe x)
);
Here the x
and y
arguments are destructured as individual fragments to create
another fragment which will become the result of applying the f
function.
The λ☶ source code and documentation are released under the terms of the attached permissive MIT license. This license is intended only to protect the future development of the project while otherwise allowing people to use the code and IP as they would like. Please, just be nice.