Skip to content
/ untyped Public

An implementation of untyped lambda calculus in Haskell

License

Notifications You must be signed in to change notification settings

kseo/untyped

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published