CHURCH-REPL
A simple REPL for lambda calculus
Use:
when calling churchrepl and new REPL will be opened.
churchrepl [-f --file file [file ...]] [-v --verbose]
Flags:
(optional) Read definitions and expressions from a file before loading the normal REPL.
-f|--file file [file ...]
(optional) print debugging and verbose output.
-v|--verbose
Church repl file structure:
The EBNF grammar is as follows*:
(* church-lambda EBNF *)
(* --- meta --- *)
program = {line};
line = (define | function);
define = "@" alias ":" function;
(* --- lambdas --- *)
function = lambda | application;
lambda = "λ" variable "." expr;
application = '(' expr expr ')';
expr = (lambda | application | variable | alias );
(* --- primitives --- *)
variable = /[a-z]/;
alias = /[_A-Z][_A-Z0-9]*/;
A simple example program:
@ID: λx.x @APPLY: λf.λx.(f x) @TRUE: λx.λy.x @FALSE: λx.λy.y @ZERO: λf.λx.x @SUCC: λn.λf.λx.(f ((n f) x)) @ONE: (SUCC ZERO) @TWO: (SUCC ONE) @THREE: (SUCC TWO) @FOUR: (SUCC THREE) (SUCC ZERO) (SUCC ONE) (SUCC TWO) (SUCC THREE) (SUCC FOUR)
Note: The λ (lambda, unicode u03bb) is equivalent to a backslash as far as this program is concerned. When using the repl it may be easier to use a backslash.
Metadata
Release files for churchrepl 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| churchrepl-1.0.2.tar.gz | 7.0 kB | Without provenance | Details for churchrepl-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| churchrepl-1.0.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for churchrepl-1.0.2-py2.py3-none-any.whl |
Total release size: 16.1 kB
Release files / churchrepl-1.0.2.tar.gz
| Download URL | churchrepl-1.0.2.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c19a84535e961ee88e01b462557c6e20ad2cf714b141567cedbe646e2562d93
|
|
BLAKE2b-256 checksum How to use checksums |
70f4944c1b9812265b4d7af14f7e837c4fe65bdbd8ad862a9f8d57729c078417
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / churchrepl-1.0.2-py2.py3-none-any.whl
| Download URL | churchrepl-1.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5319b8d84751076363b1d676967a2bb789997fce21fb8a61f01e20c426b817b5
|
|
BLAKE2b-256 checksum How to use checksums |
1b97c90f01b3638b285e84a284c378cdb2ce71008fec4f235cf00baa6a2cf25b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for churchrepl 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.