Core Language Features¶
- Full-spectrum dependent types
- Strict evaluation (plus
Lazy : Type -> Typetype constructor for explicit laziness) - Lambda, Pi (forall), Let bindings
- Pattern matching definitions
- Export modifiers
public,abstract,private - Function options
partial,total whereclauses- “magic with”
- Implicit arguments (in top level types)
- “Bound” implicit arguments
{n : Nat} -> {a : Type} -> Vect n a - “Unbound” implicit arguments —
Vect n ais equivalent to the above in a type,nandaare implicitly bound. This applies to names beginning with a lower case letter in an argument position. - ‘Tactic’ implicit arguments, which are solved by running a tactic script or giving a default argument, rather than by unification.
- Unit type
(), empty typeVoid - Tuples (desugaring to nested pairs)
- Dependent pair syntax
(x : T ** P x)(there exists anxof typeTsuch thatP x) - Inline
caseexpressions - Heterogeneous equality
donotation- Idiom brackets
- Interfaces (like type classes), supporting default methods and dependencies between methods
rewriteprfinexpr- Metavariables
- Inline proof/tactic scripts
- Implicit coercion
codata- Also
Inf : Type -> Typetype constructor for mixed data/codata. In factcodatais implemented by putting recursive arguments underInf. syntaxrules for defining pattern and term syntactic sugar- these are used in the standard library to define
if ... then ... elseexpressions and an Agda-style preorder reasoning syntax. - Uniqueness
typing
using the
UniqueTypeuniverse. - Partial
evaluation
by
%staticargument annotations. - Error message reflection
- Eliminators
- Label types
'name %logging n%unifyLog