- Notifications
You must be signed in to change notification settings - Fork0
https://www.cis.upenn.edu/~bcpierce/tapl/
NotificationsYou must be signed in to change notification settings
amir/tapl-rs
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
$ rustup run nightly cargo run --bin arith> iszero (pred (succ zero))true> if (iszero (pred (succ zero))) then (succ zero) else zero0> pred (succ (succ (succ zero)))2
$ rustup run nightly cargo run --bin fulluntyped> let x = true in (if x then (lambda x. (lambda x. (x x))) else (lambda y. y))(lambda x. (lambda x'. (x' x')))> let x = false in (if x then (lambda x. (lambda x. (x x))) else (lambda y. y))(lambda y. y)
$ rustup run nightly cargo run --bin tyarith> if true then zero else falseTypeError("arms of conditional have different types")> (succ false)TypeError("argument of succ is not a number")> if true then zero else (succ zero)0: Nat> if true then true else falsetrue: Bool> if (succ zero) then true else falseTypeError("guard of conditional not a boolean")
$ rustup run nightly cargo run --bin simplebool> (lambda x:Bool. x)(lambda x:Bool. x) : Bool->Bool> (lambda x:Bool->Bool. x)(lambda x:Bool->Bool. x) : Bool->Bool->Bool->Bool> ((lambda x:Bool->Bool. x) (lambda y:Bool. y))(lambda y:Bool. y) : Bool->Bool
$ rustup run nightly cargo run --bin fullsimple> T=Nat;T> (lambda i:T. succ i) 1213: Nat> (lambda x:Bool->Bool. if x false then true else false)(lambda x:Bool. if x then false else true)true: Bool> (lambda x:Bool. x) 11ContextError(ParameterTypeMismatch)
Inspired byhttps://github.com/hayatoito/tapl-in-rust
Releases
No releases published
Packages0
No packages published