Here you can find plan and presentations on the Haskell course authored by Dmitry Kovanikov and Arseniy Seroka.
This course is always under development and always improving constantly because there's no limit for the best Haskell course.
All slides: https://slides.com/fp-ctd
- Lecture 0: Why FP and Haskell
- Lecture 1: Stack build tool
- Lecture 2: Basic Syntax
- Lecture 3: Datas, Classes, Instances
- Lecture 4: Basic typeclasses: Monoid. Functor. Applicative
- Lecture 5: Monads
- Lecture 5.5: Parser combinators and Property-based-testing
- Lecture 6: RealWorld
- Lecture 9: Monad Transformers
- Lecture 10: Speeding up Haskell
- Lecture 11: Template Haskell and Lens
- Lecture 12: Parallel and Concurrent Haskell
- Lecture 13: Comonads
- Lecture 14: Enterprise Haskell
- Lecture 15: Advanced type features
- Lecture 16: Idris
- Uncovered topics
Templates for homework: https://github.com/ChShersh/fp-homework-templates
- Official resources
- Useful unofficial resources
- About Haskell & some wikis
- Try Haskell in web
- Editors (and IDE's for Haskell)
- Suggested tutorials and other useful online courses
- In Russian
- OHaskell: Для совсем новичков, очень доступно, но очень мало
- anton-k-github: Покрываются более продвинутые вещи + теория
- Stepic: Haskell (part 1): Лучший онлайн курс на русском; прекрасен для самостоятельно изучения
- Stepic: Haskell (part 2): Продолжение лучшего курса
- Dmitry Kovanikov: Обе части курса на Stepic покрывают лишь две трети данного курса на КТ
- Books
- Haskell Programming From First Principles: Best book currently
- LearnYouAHaskell: Free but won't help you much
- Intermediate Haskell: Advanced topics (not yet published)
- Intensive & self-learning courses
- bitemyapp: learnhaskell:
- Dmitry Kovanikov: personally I would recommend «Yorgey's cis194 course»
- Write Yourself a Scheme in 48 Hours
- bitemyapp: learnhaskell:
- In Russian
- Reallife and relatively popular examples of Haskell applications
- Standalone
- pandoc: Converter between different markup formats
- xmonad: Tiling window manager
- hledger: Accounting program
- ShellCheck: Finds bugs in your shell scripts
- Google's CodeWorld: Educational computer programming environment using Haskell
- Cryptocurrencies
- Cardano SL: Cardano Settlement Layer
- RSCoin: Implementation of the RSCoin protocol
- Haskoin: Haskell implementation of the Bitcoin protocol
- A List of companies that use Haskell: ~100 companies (on 26 Aug 2017)
- What Haskell technologies should I probably be using on a daily basis (e.g. Xmonad)?
- Standalone
- FP and Haskell paradigms (also extremely important language features)
- Static types
- Immutability by default
- Purity by default
- Non-null by default
- Sum types
- Lazy evaluation
Introductory presentation: here
- GHC, GHCi
- Haskell project structure
- Stack. Features
- How stack works. Snapshots
.cabal
and.yaml
files- Basic comands
Presentation: https://slides.com/fp-ctd/stack-build#/
- Introduction to Haskell
- Basic GHCi examples
- Function & operators definition
- Lists and functions on lists
- Haskell syntax
- let (variable declaration)
- where clause
- if expression
- Guards
- case expression
- Higher order functions
- Lambdas (anonymous functions)
- Polymoprhism
- Parametric
- Ad-hoc
- LANGUAGE pragmas
- Currying (aka partial application)
- Pattern matching
- List comprehension
- Function application: (
$
) - Function composition: (
.
) - Lazy evaluation (erathosphene sieve, fibonacci numbers, repmin)
Presentation: http://slides.com/fp-ctd/lecture-2#/
- type: type aliases
- ADT's (algebraic data types):
- product types
- sum types
- data and examples
- Record syntax
- newtype
- Type classes: class
- instance
- deriving
- -XGeneralizedNewtypeDeriving
- Modules cheatsheet
- Church-encoding ADT
Presentation: http://slides.com/fp-ctd/lecture-3#/
- Math in programming
foldr
andfoldl
Foldable
type classFunctor
Applicative
liftAN
& Applicative style programmingAlternative
- List comprehension syntax sugar
Traversable
type class (and instances forMaybe
,List
)- Automatic deriving
- Phantom types
- Type extensions:
Presentation: http://slides.com/fp-ctd/lecture-4#/
- Typed holes
- What is Monad?
Monad
type class- Monad laws
State
monadReader
monadMaybe
as example, philosophy about null-safetyEither
monad instance- Monad laws
Presentation: http://slides.com/fp-ctd/lecture-5-2019#/
- Idea of parsing and parser combinators
Parser
type- Basic parsers
- Instances:
Functor
,Applicative
,Monad
,Alternative
- Usage examples
- Testing
Presentation: http://slides.com/fp-ctd/lecture-55#/
- Building IO system from scratch
- Introduce
IO
monad - do notation
- Syntax sugar
- -XApplicativeDo
- -XRebindableSyntax
- Lazy I/O
- FFI
- Mutable data:
IORef
andIOArray
- Exceptions (
catch
,throwIO
, custom exceptions,bracket
, etc.) unsafePerformIO
- Efficient String representations:
Text
,ByteString
Presentation: http://slides.com/fp-ctd/lecture-6#/
- Monads as Effects
- Composing monads
Compose
data typeMaybeIO
exampleMonadTrans
type classMaybeT
transformerReaderT
transformer- Comparison of transformers and old types
ListT
transformerMonadIO
(why IO is so special?)MonadThrow
type classMonadError
type classmtl
style of transformationCoroutineT
fun example- To Extensible effects and beyond [//]: # (Didn't find MaybeIO and CoroutineT)
Presentation: http://slides.com/fp-ctd/lecture-9#/
- List concatenation pitfalls and Difference List
- Lazy evaluation order, WHNF, NF
- Pattern matching as evaluation
seq
,deepseq
,NFData
- -XBangPatterns
foldr
vs.foldl
vs.foldl'
- Irrefutable patterns
- Strict Haskell
- Space leaks
- Deforestation
- Stream Fusion
- Couple words about Rewrite Rules
ST
monad (STRef
,STArray
)Criterion
loop
packageilist
packagevector
package
Presentation: http://slides.com/fp-ctd/lecture-10#/
- Lens
-XCPP
- Template Haskell
- Boilerplating tuple code
- Haskell AST
- Splices
- -XQuasiQuotes
- Generate instances with
TH
Presentation: http://slides.com/fp-ctd/lecture-11#/
- Advantages of immutability and purity
- Haskell parallelism with
rpar
andrseq
- Spark pool, GC and sparks
- Threadscope
- Strategies
Par
monad examples- Difference between Parallelism and Concurrency
forkIO
andMVar
- Transactions:
STM
,TVar
Async
Presentation: http://slides.com/fp-ctd/lecture-12#/
Comonad
type class & motivationIdentity
comonad
- Zippers
- List zipper
- Game of Life
- Indexed array comonad for image processing
- Comonadic 2D-parser
- Type algebra
- Types as functions (sum, product, type variables)
- Type isomorphisms
- Zippers as deriviation: List zipper, Tree zipper
- Comonads as OOP patterns
codo
-notation
(aka method)- Comonad transformers
Presentation: http://slides.com/fp-ctd/lecture-13#/
- Build tools
- Cabal
- Stack
- Nix
- Testing: HSpec, QuickCheck
- FFI
- GUI:
gtk
(online demo) - Databases
- SQL
acid-state
Network.HTTP
Web.Scotty
Presentation: http://slides.com/fp-ctd/lecture-14#/
- forall keyword
- kinds
- Basic kinds
- Kind polymorphism (TypeInType)
- Constraint kind
- Higher kinded types
- Examples for all
- ShowBox
- ST
- Type constraints
- Pattern matching on types
- GADTs: type variables, pattern matching, type refinement
- Type safe arithmetic expressions
- Parsing to GADT
- -XDataKinds
- Extensible records
- -XTypeApplications
- -XTypeOperators
Presentation: http://slides.com/fp-ctd/lecture-15#/
- Idris tutorial
- Idris course
- Paradigms
- Totality
- Strict evalution
- Theorem proving
- DSL
- Extensible effects
- Syntax difference with Haskell
- : for type and :: for cons
- Function overloading
- Named typeclasses
- !-idiom
- [| |]-idiom
- Records
- Dependent types
Vect
data typedrop
forVect
isEmpty : Vect n a -> Bool
isSingleton : Bool -> Type
- Open and closed doors
- Total version of
head
function _|_
-eliminator- Dependent pair and filter for vectors
- Type safe
printf
implementation
- Simple examples of
Eff
- Tagging tree with labels (and counting leaves)
Uncovered topics ↑
Unfortunately there're some topics which are great but there is no time for them in this course :(
- -XTypeFamilies
Generics
- Pragmas: {-# UNPACK #-}, {-# INLINE #-}, {-# SPECIALIZE -#}, {-# RULES #-} etc.
- GHC compilation process, GHC internals & Core language
LiquidHaskell
- -XArrows and
Arrow
PureScript
Agda
- Even more advanced monads: Indexed, Effect & Super- monads
- Zygohistomorphic prepromorphisms