mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 20:47:25 +03:00
Now, there are two local binders: let x = ... use x = ... The 'let' binder will create a local definition, type-check it, and assign a name to it. When compiled, it will create 'dup' nodes. The 'use' binder is just an alias. It will not bind a new variable, and, when compiled, will create inline copies. Also, for type-checking, it allows creating aliases that are definitionaly equal for the checker.
39 lines
822 B
Plaintext
39 lines
822 B
Plaintext
Kind.Oper.show.go
|
|
: ∀(oper: Kind.Oper) String.Concatenator
|
|
= λoper
|
|
use P = λX String.Concatenator
|
|
use add = (Kind.Text.show.go "+")
|
|
use mul = (Kind.Text.show.go "*")
|
|
use sub = (Kind.Text.show.go "-")
|
|
use div = (Kind.Text.show.go "/")
|
|
use mod = (Kind.Text.show.go "%")
|
|
use eq = (Kind.Text.show.go "==")
|
|
use ne = (Kind.Text.show.go "!=")
|
|
use lt = (Kind.Text.show.go "<")
|
|
use gt = (Kind.Text.show.go ">")
|
|
use lte = (Kind.Text.show.go "<=")
|
|
use gte = (Kind.Text.show.go ">=")
|
|
use and = (Kind.Text.show.go "&")
|
|
use or = (Kind.Text.show.go "|")
|
|
use xor = (Kind.Text.show.go "^")
|
|
use lsh = (Kind.Text.show.go "<<")
|
|
use rsh = (Kind.Text.show.go ">>")
|
|
(~oper
|
|
P
|
|
add
|
|
mul
|
|
sub
|
|
div
|
|
mod
|
|
eq
|
|
ne
|
|
lt
|
|
gt
|
|
lte
|
|
gte
|
|
and
|
|
or
|
|
xor
|
|
lsh
|
|
rsh
|
|
) |