This course is designed to teach students Haskell from zero to everything needed to work with Marlowe and Plutus. The course itself doesn't contain content specific to Marlowe or Plutus. So, if you want to use it to learn Haskell for other purposes, you can! π
For a more detailed explanation, keep reading or watch the introduction video:
In the outline below, there are clear stopping points (for both Marlowe and Plutus) where we deem you to know enough Haskell to effectively use the technology.
To go through the interactive lessons, go to your chosen lesson's outline inside "What we'll cover" and click on the button that looks like the one below. If the page loads with a "500: Internal Server Error" just refresh it, and it should be fine. At the top, you will see a console that displays the progress of preparing your interactive lesson. During this time, you can scroll down and look at the lesson, that is displayed non-interactively.
And to see the video, click on the button that looks like this:
- Clone this repository.
- Create a GitPod account.
- Click this button to create a remote dev environment:
- Select the
Homework/HomeworkXXfolder with the homework you want to complete. - Follow the instructions inside the
Homework.hsorMain.hsfile. - Check the solutions in the
solutionsbranch!
Haskell-Course
| |
| |---- Homework
| |
| |---- Homework01 (Homework for lesson 01)
| |---- Homework02 (Homework for lesson 02)
| ...
|
|-------- lessons (Lessons in Jupyter notebook format. Access through Binder.)
|
|---- 1-Introduction-to-haskell
|---- 2-Functions-Data-Types-and-Signatures
Everything else can be safely ignored
This is a tentative outline. Changes can (and will) be made as we advance with the course and gather feedback from students.
If there are no buttons on a lesson, it means that it's not published yet.
- Intro to the course and lectures
- What weβll cover
- Repository structure
- Intro to Haskell
- How to open and use JupyterLab
- Purely functional programming language
- Basic syntax
- Haskell Type system
- Laziness
- GHC (and GHCi)
- GitPod
- How to open and use GitPod
- Example of how to complete a homework assignment.
- Pragmatic intro to types
- Type signature
- Functionβs signatures
- Variables in Haskell
- Parameters in functions
- Names/Definitions
- Infix and prefix functions
- Data Types in depth
- Int, Integer
- Float, Double
- Rational
- Bool
- Char
- Lists
- Strings
- Tuples + Tuples VS Lists
- Polymorphic values and type variables
- If-then-else
- Guards
letexpressionswhere- Should I use
letorwhere? - Things to keep in mind
- What is pattern matching
- Pattern matching on
- Function implementations
- Lists
- Tuples
- Case
- Higher-order functions
- The
filterfunction - The
anyfunction
- The
- Lambda functions
- Precedence and associativity
- Curried functions
- Partial application
- Composing and applying functions
- The
$operator - The
.operator
- The
- Point-free style
- Why Recursion?
- Thinking Recursively
sumandproduct
- Steps to create your own recursive function
- Examples of recursion
and,length,reverse,drop,take,map,filter
- Extracting the
foldrpattern - The
foldlfunction - The
foldl'function - When to use
foldr,foldl, andfoldl'
- The awesomeness of type classes
- What are type classes
- Common type classes
Eq,OrdNum,Integral,FloatingRead,Show
- The most general valid type
- Multiple constraints
- Type synonyms
- How to define type synonyms
- Why use type synonyms
- Defining new types
- Creating new types with
data - Using new types
- Value parameters
- Creating new types with
- Record syntax
- Type Parameters
- Prameteryzing
typesynonyms - Prameteryzing
datatypes
- Prameteryzing
- Recursive data types
Tweetme a river- A
SequenceofNodes - A
TreeofNodes
- Kinds
- The
newTypekeyword
- Overloading
- Steps to create Type Classes and Instances
- The
Eqtype class- Defining the Type Class
- Defining multiple instances
- Improving our
Eqtype class with mutual recursion (and Minimal Complete Definitions) - Defining an instance for a parameterized type.
- The
WeAcceptType Class - The
ContainerType Class - Exploring
Ordtype class (Subclassing) - Deriving
- Deriving can go wrong
- Pure functions
- Introduction to IO actions
- IO actions under the hood
- IO actions in practice
- The
()type
- The
- Interacting with the user
getChar,getLine, andputStrLn
- Actions are first-class values
- Composing IO actions (
>>and>>=operators) - The
doblock- Using
let, nesting do-blocks, escapingIOandreturn
- Using
- The
mainaction - Concepts and syntax recap
- Prelude
- pragmas/extensions
- Overview of base modules
- Importing base modules
- A few modules
- Data.Char
- Data.Tuple
- Data.Array
- Creating our own modules
- Cabal
- What is it and why we use it
- Cabal file
- Using external libraries with Cabal
- Grouping bits and bytes
- Haskell and bytes
- Lazy and strict byte strings
- Example
- TODO
- Using GHCi to find out more
- Hoogle
- HaskellWiki
- Walking through while teaching Map module
- Basic idea (definition without details)
- Intuitive examples
- Extracting the pattern
- Complete definition (with all the details/laws)
- Basic idea (definition without details)
- Intuitive examples
- Extracting the pattern
- Complete definition (with all the details/laws)
- Basic idea (definition without details)
- Intuitive examples
- Extracting the pattern
- Complete definition (with all the details/laws)
- Aeson
- Basic idea (definition without details)
- Intuitive examples
- Extracting the pattern
- Complete definition (with all the details/laws)
donotation in general
- Incentive/Motivation
- Binding strategy (see here)
- Definition
- Examples
- Incentive/Motivation
- Binding strategy
- Definition
- Examples
- Incentive/Motivation
- Binding strategy
- Definition
- Examples
- liftM
- sequence and sequence_
- mapM and mapM_
- filterM
- foldM