You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Erik Zscheile dd1f51c151 use lasso::Spur to represent identifiers 5 months ago
crates/zaias use lasso::Spur to represent identifiers 5 months ago
docs prepare parsing 5 months ago
.gitignore initial commit 5 months ago
Cargo.lock improve parser and tys 5 months ago
Cargo.toml initial commit 5 months ago initial commit 5 months ago


A concept for an (maybe quite esoteric) programming language which tries to blur the line between "sum types" and "abstract base types" / "type classes".

concrete types

Objects in the language can only have one of the following types:

  • Primitive types ("Primitive" is virtual, e.g. not available from the lang):
    • ! (empty type), can't exist at runtime, represents diverging execution
    • Unit, which only has a single value
    • Bool, which only has two possible values: true, false, and can be efficiently represented by one bit
  • Resource, the type of resource handles, which refer to objects which don't allow intuitive manipulation via functional programming, because they are dependent on interactions with the OS or I/O
  • Composed types ("Composed" is virtual):
    • Value, the type of all values in the language, (which can't contain any references to resources, thus without any side effects)
    • Mixed (virtual), the type of all composed objects, which contain both Resources and Values
  • *, the type of all objects in the language

Any type is (inside of the language) handled equivalent to a named list of all values which have this type. Traits ("interfaces") are also handled similarily, that is, if a set of values if expected, and a trait name is given, it is handled like the name of list of all values which implement that trait.

type hierarchy

# notation: subtypes ,* : supertype
! : Primitive, Mixed
Unit, Bool : Primitive, Value
Resource, Value : if T is base { Any } else { Composed }
Primitive, Composed : Any