Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages