Skip to content
/ dep Public

A very small implementation of the Calculus of Constructions for experimentation purposes

License

Notifications You must be signed in to change notification settings

plt-amy/dep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dep

A small implementation of the Calculus of Constructions, a pure type system (PTS) corresponding to the λΠ corner of Barendgret's lambda cube. That is, it has:

  • terms depending on terms (functions)
  • types depending on types (type operators)
  • types depending on terms (dependent functions)
  • values depending on types (polymorphism)

While simply-typed languages have distinct "type level" and "value level" grammars, the CoC does away with the stratification by merging these levels into a single language, expressed by the following Haskell data type.

data Term
  = Var String -- x
  | Lam String Term Term -- \(x : t). e
  | Pi String Term Term -- forall (x : k). t
  | Term :$ Term -- f x
  | Term ::: Term -- e : t
  | Type Int -- type i
  deriving (Eq, Ord)

About

A very small implementation of the Calculus of Constructions for experimentation purposes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published