Skip to content

v0.1.0

Choose a tag to compare

@dorchard dorchard released this 05 Jan 11:08
· 212 commits to main since this release

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 by Unit and Quantity constructors). There is a combinator for composing Descriptor values: & : Descriptor -> Descriptor -> Descriptor which 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.