Skip to content

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

untyped

An implementation of untyped lambda calculus in Haskell

Overview

untyped is an implementation of untyped lambda calculus presented by Benjamin C. Pierce in his Types and Programming Languages. I transliterated the original source code written in OCaml into Haskell except for the parser which I rewrote in Parsec.

Syntax

  • Variables: x
  • Applications: x x
  • Lambda abstractions: \x.x

Implementation Details

  • The representation of a variable is a number - its De Brujin index
  • Evaluation performs substitution
  • Pretty printer removes redundant parenthesis

REPL

untypedi is a REPL where you can input a lambda calculus term.

% (\x.x) (\x.x)
\x.x
% (\x.y)
Invalid lambda caluclus: (\x.y)

About

An implementation of untyped lambda calculus in Haskell

Resources

Stars

5 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages