From 08bedc44856dafddd164da7b8bd54c26a041ee44 Mon Sep 17 00:00:00 2001 From: nini-faroux Date: Tue, 21 Nov 2023 13:41:17 +0000 Subject: [PATCH 1/3] Fix broken link in docs --- docs/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 3958b98f..d52a2267 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -69,4 +69,4 @@ shellcheck...........................................(no files to check)Skipped typos....................................................................Passed ``` -To run all the code quality tooling specified in the [pre-commit-check config file](../pre-commit.nix) +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) From 3fa91c0e67da448ba0f313af42b4e7bcc0dac7f4 Mon Sep 17 00:00:00 2001 From: nini-faroux Date: Tue, 21 Nov 2023 15:16:37 +0000 Subject: [PATCH 2/3] Fix some more links --- docs/haskell.md | 2 +- docs/plutarch.md | 38 +++++++++++++++++++------------------- docs/purescript.md | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/haskell.md b/docs/haskell.md index 73ea913d..aa1e5636 100644 --- a/docs/haskell.md +++ b/docs/haskell.md @@ -19,7 +19,7 @@ github:mlabs-haskell/lambda-buffers#lbf-prelude-to-haskell`. In this chapter, we're going to use the latter option. -Let's now use `lbf-prelude-to-haskell` to process the [Document.lbf](examples/Document.lbf) schema. +Let's now use `lbf-prelude-to-haskell` to process the [Document.lbf](https://github.com/mlabs-haskell/lambda-buffers/docs/examples/Document.lbf) schema. ```purescript module Document diff --git a/docs/plutarch.md b/docs/plutarch.md index 96cd7ed5..abf80869 100644 --- a/docs/plutarch.md +++ b/docs/plutarch.md @@ -43,19 +43,19 @@ For a full example see [Example](#example). Writing .lbf schemas with API types intended for Plutarch backend will typically use the following LambdaBuffers schema modules: -1. [Prelude](../libs/lbf-prelude/Prelude.lbf), -2. [Plutus.V1](../libs/lbf-plutus/Plutus/V1.lbf), -3. [Plutus.V2](../libs/lbf-plutus/Plutus/V2.lbf). +1. [Prelude](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-prelude/Prelude.lbf), +2. [Plutus.V1](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus/Plutus/V1.lbf), +3. [Plutus.V2](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus/Plutus/V2.lbf). -Take a look at [Example.lbf](./plutarch/api/Example.lbf) schema as an example. +Take a look at [Example.lbf](https://github.com/mlabs-haskell/lambda-buffers/docs/plutarch/api/Example.lbf) schema as an example. ## Haskell libraries The necessary LambdaBuffers runtime libraries a typical Plutarch project needs when working with LambdaBuffers: -1. [lbr-plutarch](../runtimes/haskell/lbr-plutarch) a Haskell runtime library necessary for working with `lbf-xyz` libraries. -2. [lbf-prelude-plutarch](../libs/lbf-prelude) that contains the [LambdaBuffers Prelude](../libs/lbf-prelude) schema library generated by LambdaBuffers. -3. [lbf-plutus-plutarch](../libs/lbf-plutus) that contains the [LambdaBuffers Plutus](../libs/lbf-plutus) schema library generated by LambdaBuffers. +1. [lbr-plutarch](https://github.com/mlabs-haskell/lambda-buffers/runtimes/haskell/lbr-plutarch) a Haskell runtime library necessary for working with `lbf-xyz` libraries. +2. [lbf-prelude-plutarch](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-prelude) that contains the [LambdaBuffers Prelude](../libs/lbf-prelude) schema library generated by LambdaBuffers. +3. [lbf-plutus-plutarch](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus) that contains the [LambdaBuffers Plutus](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus) schema library generated by LambdaBuffers. 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). @@ -99,10 +99,10 @@ import Plutarch.Api.V1 () import Plutarch.Api.V2 () ``` -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. -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. -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. -4. LambdaBuffers.Runtime.Plutarch is a module provided by the [lbr-plutarch](../runtimes/haskell/lbr-plutarch) runtime library. +1. LambdaBuffers.Plutus.V1.Plutarch is a module generated from [Plutus.V1](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus/Plutus/V1.lbf) LambdaBuffers schema and provided by the [lbf-plutus-plutarch](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus) runtime library. +2. LambdaBuffers.Plutus.V2.Plutarch is a module generated from [Plutus.V2](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus/Plutus/V2.lbf) LambdaBuffers schema and provided by the [lbf-plutus-plutarch](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus) runtime library. +3. LambdaBuffers.Prelude.Plutarch is a module generated from [Prelude](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-prelude/Prelude.lbf) LambdaBuffers schema and provided by the [lbf-prelude-plutarch](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-prelude) runtime library. +4. LambdaBuffers.Runtime.Plutarch is a module provided by the [lbr-plutarch](https://github.com/mlabs-haskell/lambda-buffers/runtimes/haskell/lbr-plutarch) runtime library. > Generated Plutarch module for a LambdaBuffers schema `Foo/Bar.lbf` (ie. `Foo.Bar`) is stored at `Foo/Bar/Plutarch.hs` @@ -147,15 +147,15 @@ For example the `Foo` record defined above would have no difference in Plutarch prod Foo = Integer Bool ``` -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. +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/libs/lbf-prelude/Prelude.lbf) module. ## Plutarch ### Type definition mapping -Plutarch backend supports all types from the [LambdaBuffers Plutus](../libs/lbf-plutus) schema library, as to enable full featured Plutus script development. +Plutarch backend supports all types from the [LambdaBuffers Plutus](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus) schema library, as to enable full featured Plutus script development. -Additionally, it also supports some types from the [LambdaBuffers Prelude](../libs/lbf-prelude) schema library, namely `Bool`, `Integer`, `Maybe`, `Either` and `List`. +Additionally, it also supports some types from the [LambdaBuffers Prelude](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-prelude) schema library, namely `Bool`, `Integer`, `Maybe`, `Either` and `List`. ```lbf module Foo @@ -318,7 +318,7 @@ All generated types have a PShow instance derived using the internal Plutarch de ## Example -Let work through the [Plutarch example](./plutarch) available in the repo. +Let work through the [Plutarch example](https://github.com/mlabs-haskell/lambda-buffers/docs/plutarch) available in the repo. First, please check the [Getting started](getting-started.md) guide on how to prepare to work with the repo and setup Nix. @@ -340,8 +340,8 @@ lambda-buffers/docs/plutarch ❯ find The salient bits we should focus on are: -1. The LambdaBuffers .lbf schema in [./api/Example.lbf](./plutarch/api/Example.lbf) that describes the API types used by our little program, -2. The Haskell Plutarch program in [./app/Example.hs](./plutarch/app/Example.hs) that works with the API types. +1. The LambdaBuffers .lbf schema in [./api/Example.lbf](https://github.com/mlabs-haskell/lambda-buffers/docs/plutarch/api/Example.lbf) that describes the API types used by our little program, +2. The Haskell Plutarch program in [./app/Example.hs](https://github.com/mlabs-haskell/lambda-buffers/docs/plutarch/app/Example.hs) that works with the API types. To inspect the generated library: @@ -359,7 +359,7 @@ autogen/LambdaBuffers/Example/Plutarch.hs However, it's not expected for users to need to do this. If you have any issue please reach out. -Inspecting the [Cabal file](./plutarch/plutarch-example.cabal) shows the standard runtime libraries we need: +Inspecting the [Cabal file](https://github.com/mlabs-haskell/lambda-buffers/docs/plutarch/plutarch-example.cabal) shows the standard runtime libraries we need: ```shell lambda-buffers/docs/plutarch ❯ cabal info . @@ -388,4 +388,4 @@ lambda-buffers/docs/plutarch ❯ cabal run "Friends, peace and love!!!" ``` -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`). +Take a look at the [Example.hs](https://github.com/mlabs-haskell/lambda-buffers/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`). diff --git a/docs/purescript.md b/docs/purescript.md index c45535bb..91c7ec31 100644 --- a/docs/purescript.md +++ b/docs/purescript.md @@ -19,7 +19,7 @@ github:mlabs-haskell/lambda-buffers#lbf-prelude-to-purescript`. In this chapter, we're going to use the latter option. -Let's now use `lbf-prelude-to-purescript` to process the [Document.lbf](examples/Document.lbf) schema +Let's now use `lbf-prelude-to-purescript` to process the [Document.lbf](https://github.com/mlabs-haskell/lambda-buffers/examples/Document.lbf) schema ```purescript module Document From 5af8846a8346425936c12388c4e4817f2bb5de5b Mon Sep 17 00:00:00 2001 From: nini-faroux Date: Tue, 21 Nov 2023 15:45:04 +0000 Subject: [PATCH 3/3] Fix links again --- docs/haskell.md | 2 +- docs/plutarch.md | 40 ++++++++++++++++++++-------------------- docs/purescript.md | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/haskell.md b/docs/haskell.md index aa1e5636..3389513f 100644 --- a/docs/haskell.md +++ b/docs/haskell.md @@ -19,7 +19,7 @@ github:mlabs-haskell/lambda-buffers#lbf-prelude-to-haskell`. In this chapter, we're going to use the latter option. -Let's now use `lbf-prelude-to-haskell` to process the [Document.lbf](https://github.com/mlabs-haskell/lambda-buffers/docs/examples/Document.lbf) schema. +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. ```purescript module Document diff --git a/docs/plutarch.md b/docs/plutarch.md index abf80869..0e2868bd 100644 --- a/docs/plutarch.md +++ b/docs/plutarch.md @@ -43,21 +43,21 @@ For a full example see [Example](#example). Writing .lbf schemas with API types intended for Plutarch backend will typically use the following LambdaBuffers schema modules: -1. [Prelude](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-prelude/Prelude.lbf), -2. [Plutus.V1](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus/Plutus/V1.lbf), -3. [Plutus.V2](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus/Plutus/V2.lbf). +1. [Prelude](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-prelude/Prelude.lbf), +2. [Plutus.V1](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-plutus/Plutus/V1.lbf), +3. [Plutus.V2](https://github.com/mlabs-haskell/lambda-buffers/tree/main/libs/lbf-plutus/Plutus/V2.lbf). -Take a look at [Example.lbf](https://github.com/mlabs-haskell/lambda-buffers/docs/plutarch/api/Example.lbf) schema as an example. +Take a look at [Example.lbf](https://github.com/mlabs-haskell/lambda-buffers/tree/main/docs/plutarch/api/Example.lbf) schema as an example. ## Haskell libraries The necessary LambdaBuffers runtime libraries a typical Plutarch project needs when working with LambdaBuffers: -1. [lbr-plutarch](https://github.com/mlabs-haskell/lambda-buffers/runtimes/haskell/lbr-plutarch) a Haskell runtime library necessary for working with `lbf-xyz` libraries. -2. [lbf-prelude-plutarch](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-prelude) that contains the [LambdaBuffers Prelude](../libs/lbf-prelude) schema library generated by LambdaBuffers. -3. [lbf-plutus-plutarch](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus) that contains the [LambdaBuffers Plutus](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus) schema library generated by LambdaBuffers. +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. +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. +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. -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). +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). For a full example see [Example](#example). @@ -99,10 +99,10 @@ import Plutarch.Api.V1 () import Plutarch.Api.V2 () ``` -1. LambdaBuffers.Plutus.V1.Plutarch is a module generated from [Plutus.V1](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus/Plutus/V1.lbf) LambdaBuffers schema and provided by the [lbf-plutus-plutarch](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus) runtime library. -2. LambdaBuffers.Plutus.V2.Plutarch is a module generated from [Plutus.V2](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus/Plutus/V2.lbf) LambdaBuffers schema and provided by the [lbf-plutus-plutarch](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus) runtime library. -3. LambdaBuffers.Prelude.Plutarch is a module generated from [Prelude](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-prelude/Prelude.lbf) LambdaBuffers schema and provided by the [lbf-prelude-plutarch](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-prelude) runtime library. -4. LambdaBuffers.Runtime.Plutarch is a module provided by the [lbr-plutarch](https://github.com/mlabs-haskell/lambda-buffers/runtimes/haskell/lbr-plutarch) runtime library. +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. +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. +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. +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. > Generated Plutarch module for a LambdaBuffers schema `Foo/Bar.lbf` (ie. `Foo.Bar`) is stored at `Foo/Bar/Plutarch.hs` @@ -147,15 +147,15 @@ For example the `Foo` record defined above would have no difference in Plutarch prod Foo = Integer Bool ``` -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/libs/lbf-prelude/Prelude.lbf) module. +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. ## Plutarch ### Type definition mapping -Plutarch backend supports all types from the [LambdaBuffers Plutus](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-plutus) schema library, as to enable full featured Plutus script development. +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. -Additionally, it also supports some types from the [LambdaBuffers Prelude](https://github.com/mlabs-haskell/lambda-buffers/libs/lbf-prelude) schema library, namely `Bool`, `Integer`, `Maybe`, `Either` and `List`. +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`. ```lbf module Foo @@ -318,7 +318,7 @@ All generated types have a PShow instance derived using the internal Plutarch de ## Example -Let work through the [Plutarch example](https://github.com/mlabs-haskell/lambda-buffers/docs/plutarch) available in the repo. +Let work through the [Plutarch example](https://github.com/mlabs-haskell/lambda-buffers/tree/main/docs/plutarch) available in the repo. First, please check the [Getting started](getting-started.md) guide on how to prepare to work with the repo and setup Nix. @@ -340,8 +340,8 @@ lambda-buffers/docs/plutarch ❯ find The salient bits we should focus on are: -1. The LambdaBuffers .lbf schema in [./api/Example.lbf](https://github.com/mlabs-haskell/lambda-buffers/docs/plutarch/api/Example.lbf) that describes the API types used by our little program, -2. The Haskell Plutarch program in [./app/Example.hs](https://github.com/mlabs-haskell/lambda-buffers/docs/plutarch/app/Example.hs) that works with the API types. +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, +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. To inspect the generated library: @@ -359,7 +359,7 @@ autogen/LambdaBuffers/Example/Plutarch.hs However, it's not expected for users to need to do this. If you have any issue please reach out. -Inspecting the [Cabal file](https://github.com/mlabs-haskell/lambda-buffers/docs/plutarch/plutarch-example.cabal) shows the standard runtime libraries we need: +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: ```shell lambda-buffers/docs/plutarch ❯ cabal info . @@ -388,4 +388,4 @@ lambda-buffers/docs/plutarch ❯ cabal run "Friends, peace and love!!!" ``` -Take a look at the [Example.hs](https://github.com/mlabs-haskell/lambda-buffers/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`). +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`). diff --git a/docs/purescript.md b/docs/purescript.md index 91c7ec31..fd67510a 100644 --- a/docs/purescript.md +++ b/docs/purescript.md @@ -19,7 +19,7 @@ github:mlabs-haskell/lambda-buffers#lbf-prelude-to-purescript`. In this chapter, we're going to use the latter option. -Let's now use `lbf-prelude-to-purescript` to process the [Document.lbf](https://github.com/mlabs-haskell/lambda-buffers/examples/Document.lbf) schema +Let's now use `lbf-prelude-to-purescript` to process the [Document.lbf](https://github.com/mlabs-haskell/lambda-buffers/blob/main/docs/examples/Document.lbf) schema ```purescript module Document