Two important conversion operators, one for runtime and one for compile-time:
# runtime conversion
fixum _ parsed ← "42" ↦ numerus
# static ascription
fixum numerus value ← 7
fixum _ text ← value ∷ textusRuntime conversion — ↦
Use ↦ for runtime conversion, especially parsing or coercion that may
fail. Supply inline recovery with ⇥:
fixum textus input ← "9"
fixum _ n ← "42" ↦ numerus
fixum _ safe ← input ↦ numerus ⇥ 0Type-directed materialization:
fixum textus path ← "/etc/hosts"
fixum _ lanes ← [1.0, 2.0, 3.0, 4.0] ↦ vf32[4]
fixum _ body ← ad 'solum:lege' (path) ↦ textusStatic ascription — ∷
Use ∷ for explicit static type ascription. It is postfix and
target-type driven:
fixum numerus value ← 7
fixum _ x ← 7 ∷ numerus<i32>
fixum _ text ← value ∷ textusNullish coalescing — vel
Use vel for nullish coalescing when a value is nihil:
fixum textus ∪ nihil provided_name ← nihil
fixum _ name ← provided_name vel "default"