-
-
Notifications
You must be signed in to change notification settings - Fork 1
Type System
Lambda Calculus just has variables, functions, and function applications. It is a "dynamic" language without static types.
λx. x y z
Types can help distinguish terms and their intended purpose.
The :
colon is traditionally used to separate terms from types.
LM uses prefix notation for everything, so the colon precedes both the term and the type.
Traditional Notation
1 : Integer
LM Notation
(: 1 Integer)
System F adds the ability for objects to be parameterized with quantified type variables. In LM type variables are represented with lowercase identifiers.
some : a -> Option<a>
System F<: adds the ability for objects to become subtypes (<:) of more than one type.
In standard notation this might look something like this:
type X implies Y;
(x : X) <: Y # yes
In plural notation the subtyping relations can often be expanded to clarify a bit more of what is going on.
(x : X+Y) <: Y # yes
Specialization adds the ability to pun (overload) functions onto the same identifier. Then, when applied, punned functions are "narrowed as necessary" to decide which function to apply. This resolution happens entirely at compile time.
The λ☶ source code and documentation are released under the terms of the attached permissive MIT license. This license is intended only to protect the future development of the project while otherwise allowing people to use the code and IP as they would like. Please, just be nice.