Just an interpreter for the pie language described in "The Little Typer" I'm working on as a hobby. Buy the book. Seriously. It's good.
The project can be built with either cabal, run:
cabal new-build
The tests can be run with cabal new-test
.
The pie-repl
build target provides a binary that can be used as a pie repl. The easiest way to use this directly from the project is through cabal new-run pie-repl
.
Welcome to pie! Each line will be evaluated as an expr!
pie> (claim twin (Pi ((Y Universe)) (-> Y (Pair Y Y))))
claimed
pie> (define twin (lambda (Y) (lambda (x) (cons x x))))
defined
pie> ((twin Nat) 3)
(the (Pair Nat Nat) (cons 3 3))
pie> (which-Nat 0 'foo (lambda (x) 'bar))
(the Atom 'foo)
pie> (which-Nat 1 'bar (lambda (x) 'bar))
(the Atom 'bar)