diff --git a/code/week02/README.md b/code/week02/README.md index 42dc4305d..802d988ba 100644 --- a/code/week02/README.md +++ b/code/week02/README.md @@ -1,6 +1,8 @@ -## Lecture 2 notes +# Lecture 2 notes +Lecture notes based on the first ever official https://github.com/input-output-hk/plutus-pioneer-program/[Plutus-Pioneer program]. This notes follow the https://www.youtube.com/watch?v=E5KRk5y9KjQ/[YouTube lecture 2] -1) Get started with the cabal repl +[[get-started]] +## 1) Get started with the cabal repl Since we are not installing cabal locally, bacause it is much more convenient to use it from nix-shell (this is included in nix), we will navigate to the plutus-pioneer/week02 git-cloned repo inside a nix environment. However, nix must be started first from the plutus root repo. @@ -20,13 +22,16 @@ Some examples seeing the type of Data and create bite-string on the fly (use lit repl$ :t B "Haskellanians" ## --------------------------------------------------------------------------------------- -2) Implement our first validator. Start a Haskell module "Week02.Gift" where the script imports all the necessary language extensions that plutus needs. (first 8 lines `{-#...#-}`) and other modules that we refer to (lines 12-28) from the `./week01/EnglishAuction.hs` script. + +[[first-validator]] +## 2) Implement our first validator. Start a Haskell module "Week02.Gift" where the script imports all the necessary language extensions that plutus needs. (first 8 lines `{-#...#-}`) and other modules that we refer to (lines 12-28) from the `./week01/EnglishAuction.hs` script. Go back to the repl and load Gift.hs. Then we will see what a Monoid in haskell `()` repl$ :l ./src/Week02/Gift.hs repl$ :t () -We can open Gift.hs in a text editor and see that lines 31-35 contain the implementation of Monoid +We can open Gift.hs in a text editor and see that lines 31-35 contain the implementation of Monoid referring to the [get-started] section above. +