A dependently typed language that makes generic programming easy. Read the "leveling up" paper to get an idea of what the final language will support, in terms of generic programming.
Cabal install dependencies:
make # This will fail with SHE errors make
You have to run
make twice because the unification library uses SHE
and SHE is not very smart.
To build the Spire language binary, type
make in the root directory of this project.
Now you can pass the location of file to be type checked:
When developing, it can be tedious to recompile the executable all the time. You can run Spire with runghc instead:
cd src runghc Spire.hs ../examples/Basic.spire
There is an Emacs mode for Spire, which can be found in
Add the following to your Emacs initialization file:
(load-file "/PATH-TO-SPIRE-CHECKOUT/editor/emacs/spire-mode.el") (require 'spire-mode)
Now customize the Emacs variable that specifies the location of the Spire executable:
M-x customize group spire
Then set the
Spire Command variable to the location of the executable:
- Fill in
Save for future sessions.
Using the mode
Syntax highlighting will automatically be performed for any files with a
To type check the current file:
The results of type checking appear in a separate Emacs window.
The current implementation is written in Haskell. The semantics is defined using hereditary substitution. Hereditary substitution has its roots in making a PL's semantics syntactically terminating. We hope to use this Haskell implementation as a prototype, and ultimately end up with a formally mechanized implementation in Agda that capitalizes on the termination properties of hereditary substitution.