mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 03:45:29 +03:00
Fix links in docs folder.
This commit is contained in:
parent
6d4bc6d23d
commit
2fbb25c609
@ -1,6 +1,6 @@
|
||||
# Automatic vectorization with tagged lambdas
|
||||
|
||||
We have seen in [Dups and Sups](docs/dups-and-sups.md) that duplications and superpositions can have labels. In HVM, lambdas and applications can have labels too.
|
||||
We have seen in [Dups and Sups](dups-and-sups.md) that duplications and superpositions can have labels. In HVM, lambdas and applications can have labels too.
|
||||
|
||||
Tagged applications will only annihilate lambdas with the same tag.
|
||||
```rs
|
||||
@ -48,6 +48,6 @@ This works because the `Bool`-tagged application in `not` passes through the `Li
|
||||
The tagged lambda and applications are compiled to `inet` nodes with different tag values for each data type. This allows them to commute, read [HVM-Core](https://github.com/HigherOrderCO/hvm-core/tree/main#language) to learn more about it.
|
||||
|
||||
### Limitations
|
||||
- When using a [built-in data type](docs/defining-data-types.md) (created using the `data` keyword), it must not contain fields
|
||||
- When using a [built-in data type](defining-data-types.md) (created using the `data` keyword), it must not contain fields
|
||||
- The function must not be recursive
|
||||
- There must not be labels in common between the function and what you want to vectorize over
|
@ -24,7 +24,7 @@ When reading back, if we visit a Constructor via port 0 then we know it's a lamb
|
||||
|
||||
- The `Number` node uses the label to store it's number.
|
||||
- An `Op2` node uses the label to store it's operation.
|
||||
- And a `Constructor` node can have a label too! This is used for `dup` and [lambda tags](docs/automatic-vectorization-with-tagged-lambdas.md.
|
||||
- And a `Constructor` node can have a label too! This is used for `dup` and [lambda tags](automatic-vectorization-with-tagged-lambdas.md.
|
||||
|
||||
A duplication `dup a b = x` compiles into a Constructor node too, but with a different label.
|
||||
A superposition `{a b}` compiles to a Constructor node too. The difference here comes from context too.
|
||||
|
@ -52,7 +52,7 @@ Output:
|
||||
|
||||
What? This is even more confusing. The first two values are `1`, as expected. But what about the last term?
|
||||
|
||||
The last term in the tuple is a **superposition** of two values. A [superposition](docs/dups-and-sups.md) is the "other side" of a duplication. It is created here because we implicitly duplicated `f` when we used it twice, and duplicating lambdas creates superpositions.
|
||||
The last term in the tuple is a **superposition** of two values. A [superposition](dups-and-sups.md) is the "other side" of a duplication. It is created here because we implicitly duplicated `f` when we used it twice, and duplicating lambdas creates superpositions.
|
||||
|
||||
## Usage
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user