Skip to content

Working towards a Pie (The Little Typer) interpreter

License

Notifications You must be signed in to change notification settings

johnchildren/pie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI

pie

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.

Building

The project can be built with either cabal, run:

cabal new-build

Development

The tests can be run with cabal new-test.

Repl

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)

Reference Material

About

Working towards a Pie (The Little Typer) interpreter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published