Skip to content

omentic/chrysanthemum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chrysanthemum

chrysanthemum is a simple language with a complex type system, initially written as a term project for CPSC 539. It implements a number of features from the excellent Types and Programming Languages, including:

  • The simply typed lambda calculus
  • Bidirectional type checking and subtyping support
  • A somewhat complex type system: including support for:
    • unit, bool, int, nat, float, str,
    • struct, tuple, union, list, array, slice,
    • interface, empty, error

todo

  • the simple lambda calculus: implement execute
  • to be fancy: implement parse
  • to lose my sanity: implement parse_file
  • bidirectional typechecking: implement infer and check
  • extend to additional basic types: refactor Term
  • extend to complex types: improve subtype
  • meet my original standards: implement interface
  • make complex types useful: implement access
  • type classes: implement monomorphize
  • simple effects: extend ast
  • testtesttest

architecture

src/
src/main.rs    # the user facing program
src/simple.rs  # the simple lambda calculus: execution
src/ast.rs     # the fundamental representation of types and terms
src/bidirectional.rs # the core of the language: checking, inference
src/unification.rs   # an alternate core: checking and inference by unification
src/parser.rs        # parses user programs into proper data structures
src/monomorphize.rs  # a monomorphization pass for type classes
src/effects.rs       # code for effects idk
test/ # various tests

bibliography