Repository navigation
Releases: plas4sci/fortl
Releases · plas4sci/fortl
Release list
v0.3.0beta
Stringliterals- Exponentiation operation on floats (and their
Descriptoranalysis) - Scientific notation accepted for floating-point literals
Nonetype (and its constructorNone) built-in.sqrtfunction that is well-typed.- Gradable booleans and conditional expressions
SpeciesandBasisindexed descriptorsDimensiongraded descriptor (akin toUnit) but with closed type.- Python-style
deffunction blocks with typed arguments andreturn - Unicode identifiers (Greek and a few other symbols) allowed
- Affine spaces
v0.2.0 - Public
And we're live...
- Pythonic syntax applied to types
- Typing now includes implicit types with type dependency (for resolving
Floatwhich has kind{d : Descriptor} -> d -> Type - REPL
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.