Skip to content

Commit b69f5b2

Browse files
committed
address review comments
1 parent 2c50e51 commit b69f5b2

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

src/plutus/builtin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Builtin Types and Functions
1+
# Built-in Types and Functions

src/plutus/syntax.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
# Syntax
22

3-
The following listing shows the syntax of Plutus.
3+
The following listing shows the concrete syntax of Plutus.
44
The corresponding Haskell definition can be found in [UntypedPlutusCore.Core.Type](https://plutus.cardano.intersectmbo.org/haddock/latest/plutus-core/UntypedPlutusCore-Core-Type.html#t:Term).
55

66
```text
77
𝐿, 𝑀, 𝑁 ∈ Term ::= 𝑥 variable
88
| (con T 𝑐) constant 𝑐 with type T
9-
| (builtin 𝑏) builtin
9+
| (builtin 𝑏) built-in
1010
| (lam 𝑥 𝑀) lambda abstraction
1111
| [𝑀 𝑁] application
1212
| (delay 𝑀) delayed execution of a term
1313
| (force 𝑀) force execution of a term
14-
| (constr 𝑘 𝑀₀ … 𝑀ₘ₋₁) constructor with tag 𝑘 and 𝑚 arguments
15-
| (case 𝑀 𝑁₀ … 𝑁ₘ₋₁) case analysis with 𝑚 alternatives
16-
| (error) error
14+
| (constr 𝑘 𝑀₁ … 𝑀ₘ) constructor with tag 𝑘 and 𝑚 arguments (𝑚 ≥ 0).
15+
Available since 1.1.0
16+
| (case 𝑀 𝑁₁ … 𝑁ₘ) case analysis with 𝑚 alternatives (𝑚 ≥ 0).
17+
Available since 1.1.0
18+
| (error) error
1719
1820
𝑃 ∈ Program ::= (program 𝑣 𝑀) versioned program
1921
```
2022

21-
Plutus (Untyped Plutus Core) is untyped in the sense that variables don't have type tags, and the same variable can have different types during evaluation.
23+
Plutus (Untyped Plutus Core) is untyped in the sense that variables don't have type tags.
2224
Constants, however, do carry type tags.
23-
A constant must be of a builtin type.
24-
Builtin types and functions are listed in [Builtin Types and Functions](./builtin.md).
25+
A constant must be of a built-in type.
26+
Built-in types and functions are listed in [Built-in Types and Functions](./builtin.md).
2527

2628
## Version Numbers
2729

28-
The 𝑣 in a program is the _Plutus Core language version_.
30+
The 𝑣 in a program is the _Plutus Core language version_, in the form of `x.y.z`.
2931
This is distinct from the Plutus ledger language version.
3032
For a detailed explanation, see [Different Notions of Version](https://plutus.cardano.intersectmbo.org/docs/essential-concepts/versions).
3133

@@ -44,9 +46,11 @@ The Haskell definition uses `Word64` for the tag.
4446
## de Bruijn Indices
4547

4648
Variable `𝑥` in the above listing can be either textual strings or de Bruijn indices.
47-
de Bruijn indices are used in serialized scripts.
49+
De Bruijn indices are used in serialized scripts.
4850
It therefore makes the most sense for a CEK machine implementation to use de Bruijn indices.
4951

52+
When using de Bruijn indices, the binder `𝑥` in `(lam 𝑥 𝑀)` is irrelevant, and any number can be used.
53+
5054
## The `data` Type
5155

5256
We provide a built-in type, `data`, which permits the encoding of simple data structures

0 commit comments

Comments
 (0)