yagi
is an experimental, dependently-typed programming language, still in the "primordial ooze" phase of development. The project consists of three parts:
yagi-lang
defines theyagi
syntax, parser, and typecheckeryagi-lsp-server
is a language server foryagi
built with thelsp
packageyagi-lsp-client
isvscode
extension which communicates with theyagi
language server to show parsing and type information
At the moment, significant portions of the code are directly adapted from the following excellent projects.
-
For the intial typechecker, I translated some of the OCaml code from Andrej Bauer's series "How to Implement Dependent Type Theory" into Haskell.
-
The
yagi
parser is built withmegaparsec
. I am using a customStream
instance to attach position information to each node of the tree. -
The structure of the
yagi
language server is mostly copied fromdhall-lsp-server
. I learned a lot reading through the source code of the Dhall language server (also usinglsp
) and parser (also based onmegaparsec
). -
The
yagi
language client was written usingvscode-haskell
as a reference. See also the language server extension guide.
The haskell-language-server
source has also been a valuable reference.
Implemented
- pi-types
- universes
- type annotations
Todo
- normalization by evaluation
- sigma-types
- pattern matching
- tactics
- typeclasses
- do-notation
- inductive types
Stretch Goals
- ornaments
- built-in induction principles and recursion schemes
- stream fusion