Skip to content
/ untyped Public
forked from kseo/untyped

An implementation of untyped lambda calculus in Haskell

License

Notifications You must be signed in to change notification settings

helvm/untyped

 
 

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

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages

  • Haskell 100.0%