REFERENCE / 08
Value Kinds and IR Nodes
Type errors tell you what kind of value a function expected. These are the types you will encounter while authoring:
| Kind | Meaning | Example |
|---|---|---|
| Number | Scalar dimension, angle, count, or other numeric value | 12, 4mm |
| Boolean | True or false | true, (< width 20) |
| Text | A string | "lid" |
| List | Ordered values | (list 1 2 3) |
| Point2 | Two coordinates | (vec2 10 20) |
| Point3 | Three coordinates | (vec3 10 20 5) |
| Sketch | Planar geometry used as a profile | (circle 8) |
| Path | Route through points | (path (0 0 0) (0 0 20)) |
| Frame | Position and orientation | (plane :origin '(0 0 10)) |
| Solid | Geometry with volume | (box 20 10 4) |
| Compound | Grouped geometry | (compound a b) |
| Any | No narrower type required at this position | Depends on the call |
For example, passing (box 20 10 4) to a function that expects a sketch is a type mismatch. Use a 2D profile such as (rectangle 20 10) instead.
IR means the compiler's intermediate representation. Names such as Literal, Call, Reference, Build, and Let describe internal nodes in diagnostics; they are not additional geometry functions.