Repository navigation
v0.1.0
Key ideas in this version:
- Pythonic syntax, but currently only straight line code and lambdas, no control flow.
- Typing is optional but the type checker requires usually some amount of annotation of definitions.
- Floats are graded abelian groups, graded by
Descriptors which are generated by the free-abelian group over constructors names (which do not need defining and can be arbitrarily introduced, but must be guarded byUnitandQuantityconstructors). There is a combinator for composingDescriptorvalues:& : Descriptor -> Descriptor -> Descriptorwhich behaves a bit like linear logic 'with' (additive conjunction), see, e.g. https://github.com/plas4sci/fortl/blob/main/examples/quantity.frtl:
y : Float(Unit(m) & Quantity(length)) = 2.0
x : Float(Unit(m) & Quantity(length)) = 1.0 + y
t : Float(Unit(s)) = 4.0
it : Float(Unit(s^-1 * m) & Quantity(length)) = (x + y) / t
- If defined, the interpreter prints out the definition
it.