Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
forked fromkseo/simple

An implementation of simply typed lambda calculus in Haskell

License

NotificationsYou must be signed in to change notification settings

yy-zhong/simple

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An implementation of simply typed lambda calculus in Haskell

Overview

simple is an implementation of simply typed lambda calculus presented by Benjamin C. Pierce in hisTypes and Programming Languages. I transliterated the original source code written in OCaml into Haskell except for the parser which I rewrote inParsec.

Syntax

  • Variables: x
  • Applications: x x
  • Lambda abstractions: \x.x
  • Conditional: if x then y else z
  • Booleans: true, false

Implementation Details

  • The representation of a variable is a number - its De Brujin index
  • Evaluation performs substitution

REPL

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

% \x:Bool.x(\x:Bool.x)$ (\x:Bool->Bool.x) trueparameter type mismatch at (1,19)

About

An implementation of simply typed lambda calculus in Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell100.0%

[8]ページ先頭

©2009-2025 Movatter.jp