yagi is an experimental, dependently-typed programming language, still in the "primordial ooze" phase of development. The project consists of three parts:
yagi-langdefines theyagisyntax, parser, and typecheckeryagi-lsp-serveris a language server foryagibuilt with thelsppackageyagi-lsp-clientisvscodeextension which communicates with theyagilanguage 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
yagiparser is built withmegaparsec. I am using a customStreaminstance to attach position information to each node of the tree. -
The structure of the
yagilanguage 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
yagilanguage client was written usingvscode-haskellas 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