Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kseo/untyped
An implementation of untyped lambda calculus in Haskell
https://github.com/kseo/untyped
Last synced: about 2 months ago
JSON representation
An implementation of untyped lambda calculus in Haskell
- Host: GitHub
- URL: https://github.com/kseo/untyped
- Owner: kseo
- License: bsd-3-clause
- Created: 2016-12-06T11:16:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-24T16:12:11.000Z (about 8 years ago)
- Last Synced: 2024-10-11T23:22:19.589Z (3 months ago)
- Language: Haskell
- Size: 19.5 KB
- Stars: 6
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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][tapl]. I transliterated the original source code written in OCaml into Haskell except for the parser which I rewrote in [Parsec][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)
```[parsec]: https://hackage.haskell.org/package/parsec
[tapl]: https://www.google.co.kr/search?q=tapl&oq=tapl&aqs=chrome..69i57j69i60l3j0l2.776j0j7&sourceid=chrome&ie=UTF-8#q=tapl+benjamin