c
This commit is contained in:
8
spec.md
8
spec.md
@@ -358,14 +358,18 @@ def add = a -> b -> a + b
|
||||
- `func(arg1, arg2)`: function application. requires at least one argument. partial function applications are allowed too
|
||||
- `func(_, arg)`: bind some args from function, return funciton taking in the args with `_`, or the non-specified ones
|
||||
- `expr :: type`: down-cast type
|
||||
- `recExpr and otherRecExpr`: "sum" fields together of both record expressions.
|
||||
type checking: phi-unify `recExpr` with `otherRecExpr`, and require that both are non-nominal record types
|
||||
- `recExpr and otherRecExpr`:
|
||||
if both types are record types, or tagged record types:
|
||||
- "sum" fields together of both record expressions.
|
||||
type checking: phi-unify `recExpr` with `otherRecExpr`, and require that both are non-nominal record types
|
||||
- else: identical to `\`a and b\`(a, b)`
|
||||
- `if cond then a else b`
|
||||
- `{field1: val1, field2: val2}` field construction
|
||||
- `match expr with <match cases>`: [pattern matching](##pattern-matching)
|
||||
- `'Tag expr`
|
||||
- `a = b` the [equality operator](##equality-operator)
|
||||
- `-a`: identical to `\`-a\`(a)` name: "negate"
|
||||
- `a or b`: identical to `\`a or b\`(a, b)` name: "or"
|
||||
- `a ^ b`: identical to `\`a^b\`(a, b)` name: "exponent"
|
||||
- `a + b`: identical to `\`a+b\`(a, b)` name: "sum"
|
||||
- `a - b`: identical to `\`a-b\`(a, b)` name: "difference"
|
||||
|
Reference in New Issue
Block a user