You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To run all the code quality tooling specified in the [pre-commit-check config file](../pre-commit.nix)
72
+
To run all the code quality tooling specified in the [pre-commit-check config file](https://github.com/mlabs-haskell/lambda-buffers/blob/main/pre-commit.nix)
In this chapter, we're going to use the latter option.
21
21
22
-
Let's now use `lbf-prelude-to-haskell` to process the [Document.lbf](examples/Document.lbf) schema.
22
+
Let's now use `lbf-prelude-to-haskell` to process the [Document.lbf](https://github.com/mlabs-haskell/lambda-buffers/tree/main/docs/examples/Document.lbf) schema.
Take a look at [Example.lbf](./plutarch/api/Example.lbf) schema as an example.
50
+
Take a look at [Example.lbf](https://github.com/mlabs-haskell/lambda-buffers/tree/main/docs/plutarch/api/Example.lbf) schema as an example.
51
51
52
52
## Haskell libraries
53
53
54
54
The necessary LambdaBuffers runtime libraries a typical Plutarch project needs when working with LambdaBuffers:
55
55
56
-
1.[lbr-plutarch](../runtimes/haskell/lbr-plutarch) a Haskell runtime library necessary for working with `lbf-xyz` libraries.
57
-
2.[lbf-prelude-plutarch](../libs/lbf-prelude) that contains the [LambdaBuffers Prelude](../libs/lbf-prelude) schema library generated by LambdaBuffers.
58
-
3.[lbf-plutus-plutarch](../libs/lbf-plutus) that contains the [LambdaBuffers Plutus](../libs/lbf-plutus) schema library generated by LambdaBuffers.
56
+
1.[lbr-plutarch](https://github.com/mlabs-haskell/lambda-buffers/tree/main/runtimes/haskell/lbr-plutarch) a Haskell runtime library necessary for working with `lbf-xyz` libraries.
57
+
2.[lbf-prelude-plutarch](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-prelude) that contains the [LambdaBuffers Prelude](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-prelude) schema library generated by LambdaBuffers.
58
+
3.[lbf-plutus-plutarch](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-plutus) that contains the [LambdaBuffers Plutus](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-plutus) schema library generated by LambdaBuffers.
59
59
60
-
Of course, additional imports for Plutarch libraries are also necessary [plutarch](https://github.com/Plutonomicon/plutarch-plutus) and optionally [plutarch-extra](https://github.com/Plutonomicon/plutarch-plutus/plutarch-extra).
60
+
Of course, additional imports for Plutarch libraries are also necessary [plutarch](https://github.com/Plutonomicon/plutarch-plutus) and optionally [plutarch-extra](https://github.com/Plutonomicon/plutarch-plutus/tree/master/plutarch-extra).
61
61
62
62
For a full example see [Example](#example).
63
63
@@ -99,10 +99,10 @@ import Plutarch.Api.V1 ()
99
99
importPlutarch.Api.V2 ()
100
100
```
101
101
102
-
1.LambdaBuffers.Plutus.V1.Plutarch is a module generated from [Plutus.V1](../libs/lbf-plutus/Plutus/V1.lbf) LambdaBuffers schema and provided by the [lbf-plutus-plutarch](../libs/lbf-plutus) runtime library.
103
-
2.LambdaBuffers.Plutus.V2.Plutarch is a module generated from [Plutus.V2](../libs/lbf-plutus/Plutus/V2.lbf) LambdaBuffers schema and provided by the [lbf-plutus-plutarch](../libs/lbf-plutus) runtime library.
104
-
3.LambdaBuffers.Prelude.Plutarch is a module generated from [Prelude](../libs/lbf-prelude/Prelude.lbf) LambdaBuffers schema and provided by the [lbf-prelude-plutarch](../libs/lbf-prelude) runtime library.
105
-
4.LambdaBuffers.Runtime.Plutarch is a module provided by the [lbr-plutarch](../runtimes/haskell/lbr-plutarch) runtime library.
102
+
1.LambdaBuffers.Plutus.V1.Plutarch is a module generated from [Plutus.V1](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-plutus/Plutus/V1.lbf) LambdaBuffers schema and provided by the [lbf-plutus-plutarch](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-plutus) runtime library.
103
+
2.LambdaBuffers.Plutus.V2.Plutarch is a module generated from [Plutus.V2](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-plutus/Plutus/V2.lbf) LambdaBuffers schema and provided by the [lbf-plutus-plutarch](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-plutus) runtime library.
104
+
3.LambdaBuffers.Prelude.Plutarch is a module generated from [Prelude](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-prelude/Prelude.lbf) LambdaBuffers schema and provided by the [lbf-prelude-plutarch](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-prelude) runtime library.
105
+
4.LambdaBuffers.Runtime.Plutarch is a module provided by the [lbr-plutarch](https://github.com/mlabs-haskell/lambda-buffers/tree/main/runtimes/haskell/lbr-plutarch) runtime library.
106
106
107
107
>GeneratedPlutarch module for a LambdaBuffers schema `Foo/Bar.lbf` (ie. `Foo.Bar`) is stored at `Foo/Bar/Plutarch.hs`
108
108
@@ -147,15 +147,15 @@ For example the `Foo` record defined above would have no difference in Plutarch
147
147
prod Foo = Integer Bool
148
148
```
149
149
150
-
The Plutarch backend doesn't support the use of `Char`, `Text`, `Bytes` (there's a Plutus.V1.Bytes), `Set` and `Map` (there's a Plutus.V1.Map) from [LambdaBuffers Prelude](../libs/lbf-prelude/Prelude.lbf) module.
150
+
The Plutarch backend doesn't support the use of `Char`, `Text`, `Bytes` (there's a Plutus.V1.Bytes), `Set` and `Map` (there's a Plutus.V1.Map) from [LambdaBuffers Prelude](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-prelude/Prelude.lbf) module.
151
151
152
152
## Plutarch
153
153
154
154
### Type definition mapping
155
155
156
-
Plutarch backend supports all types from the [LambdaBuffers Plutus](../libs/lbf-plutus) schema library, as to enable full featured Plutus script development.
156
+
Plutarch backend supports all types from the [LambdaBuffers Plutus](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-plutus) schema library, as to enable full featured Plutus script development.
157
157
158
-
Additionally, it also supports some types from the [LambdaBuffers Prelude](../libs/lbf-prelude) schema library, namely `Bool`, `Integer`, `Maybe`, `Either` and `List`.
158
+
Additionally, it also supports some types from the [LambdaBuffers Prelude](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-prelude) schema library, namely `Bool`, `Integer`, `Maybe`, `Either` and `List`.
159
159
160
160
```lbf
161
161
module Foo
@@ -318,7 +318,7 @@ All generated types have a PShow instance derived using the internal Plutarch de
318
318
319
319
## Example
320
320
321
-
Let work through the [Plutarch example](./plutarch) available in the repo.
321
+
Let work through the [Plutarch example](https://github.com/mlabs-haskell/lambda-buffers/tree/main/docs/plutarch) available in the repo.
322
322
323
323
First, please check the [Getting started](getting-started.md) guide on how to prepare to work with the repo and setup Nix.
1. The LambdaBuffers .lbf schema in [./api/Example.lbf](./plutarch/api/Example.lbf) that describes the API types used by our little program,
344
-
2. The Haskell Plutarch program in [./app/Example.hs](./plutarch/app/Example.hs) that works with the API types.
343
+
1. The LambdaBuffers .lbf schema in [./api/Example.lbf](https://github.com/mlabs-haskell/lambda-buffers/tree/main/docs/plutarch/api/Example.lbf) that describes the API types used by our little program,
344
+
2. The Haskell Plutarch program in [./app/Example.hs](https://github.com/mlabs-haskell/lambda-buffers/tree/main/docs/plutarch/app/Example.hs) that works with the API types.
However, it's not expected for users to need to do this. If you have any issue please reach out.
361
361
362
-
Inspecting the [Cabal file](./plutarch/plutarch-example.cabal) shows the standard runtime libraries we need:
362
+
Inspecting the [Cabal file](https://github.com/mlabs-haskell/lambda-buffers/tree/main/docs/plutarch/plutarch-example.cabal) shows the standard runtime libraries we need:
363
363
364
364
```shell
365
365
lambda-buffers/docs/plutarch ❯ cabal info .
@@ -388,4 +388,4 @@ lambda-buffers/docs/plutarch ❯ cabal run
388
388
"Friends, peace and love!!!"
389
389
```
390
390
391
-
Take a look at the [Example.hs](./plutarch/app/Example.hs) to see how generated types are used, namely how they are constructed with `pcon` and deconstructed with `pmatch` (or `pmatchC`).
391
+
Take a look at the [Example.hs](https://github.com/mlabs-haskell/lambda-buffers/tree/main/docs/plutarch/app/Example.hs) to see how generated types are used, namely how they are constructed with `pcon` and deconstructed with `pmatch` (or `pmatchC`).
0 commit comments