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 1: Why FP and Haskell
- Lecture 2: Basic Syntax
- Lecture 3: Datas, Classes, Instances
- Lecture 4: Kinda monoidal types
- Lecture 5: Monads, part 1
- Lecture 6: Functors, Applicative Functors
- Lecture 6.5: Parser combinators and Property-based-testing
- Lecture 7: Monads, part 2
- Lecture 8: 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
Lecture 1: Why FP and Haskell (by Arseniy Seroka) ↑
- 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
Presentation (ru): http://camlunity.ru/swap/haskell/whyhaskell.pdf
Lecture 2: Basic Syntax (by Dmitry Kovanikov) ↑
- 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#/
Lecture 3: Datas, Classes, Instances (by Dmitry Kovanikov) ↑
- type: type aliases
- ADT's (algebraic data types):
- product types
- sum types
- data and examples
- Record syntax
- newtype
- Type classes: class
- instance
- deriving
-ddump-deriv- -XGeneralizedNewtypeDeriving
- Modules cheatsheet
- Church-encoding ADT
- Type classes as Dictionaries
coerce
Presentation: http://slides.com/fp-ctd/lecture-3#/
Lecture 4: Kinda monoidal types (by Dmitry Kovanikov) ↑
- Phantom types
- forall keyword
- kinds
- Basic kinds
- Kind polymorphism (TypeInType)
- Constraint kind
- Higher kinded types
- Math in programming
SemigroupandMonoid- A lot of examples
- Finger Tree
foldrandfoldlFoldabletype class
Presentation: http://slides.com/fp-ctd/lecture-4#/
Lecture 5: Monads, part 1 (by Dmitry Kovanikov) ↑
- Talk about boxes
- What is Monad?
Monadtype class- Monad laws
Maybeas example, philosophy about null-safety- Equational reasoning
- Proving Monad laws for Maybe
Identitymonad instanceEithermonad instance- Monad composition
Listmonad instance- then :
>> - List monad nondeterminism
join- Weird custom monads
- Useful Monad functions
Presentation: http://slides.com/fp-ctd/lecture-5#/
Lecture 6: Functors, Applicative Functors (by Arseniy Seroka) ↑
FunctorBifunctorApplicativeliftAN& Applicative style programmingAlternative- List comprehension syntax sugar
Traversabletype class (and instances forMaybe,List)- Automatic deriving
- Type hierarchy proposals
- Type classes hierarchy
Presentation: http://slides.com/fp-ctd/lecture-6#/
Lecture 6.5: Parser combinators and Property-based-testing (by Dmitry Kovanikov) ↑
- Idea of parsing and parser combinators
Parsertype- Basic parsers
- Instances:
Functor,Applicative,Monad,Alternative - Usage examples
- Testing
Presentation: http://slides.com/fp-ctd/lecture-65#/
Lecture 7: Monads, part 2 (by Dmitry Kovanikov) ↑
WritermonadReadermonad- Typed holes
- Partial type signatures
StatemonadContmonad and Continuation Passing Style (CPS)
Presentation: http://slides.com/fp-ctd/lecture-7#/
Lecture 8: RealWorld (by Arseniy Seroka) ↑
- Building IO system from scratch
- Introduce
IOmonad - do notation
- Syntax sugar
- -XApplicativeDo
- -XRebindableSyntax
- Lazy I/O
- FFI
- Mutable data:
IORefandIOArray - Exceptions (
catch,throwIO, custom exceptions,bracket, etc.) unsafePerformIOandunsafeInterleaveIO- Efficient String representations:
Text,ByteString
Presentation 8: http://slides.com/fp-ctd/lecture-8#/
Lecture 9: Monad Transformers (by Arseniy Seroka) ↑
- Monads as Effects
- Composing monads
Composedata typeMaybeIOexampleMonadTranstype classMaybeTtransformerReaderTtransformer- Comparison of transformers and old types
ListTtransformerMonadIO(why IO is so special?)MonadThrowtype classMonadErrortype classmtlstyle of transformationCoroutineTfun example- To Extensible effects and beyond [//]: # (Didn't find MaybeIO and CoroutineT)
Presentation: http://slides.com/fp-ctd/lecture-9#/
Lecture 10: Speeding up haskell (by Dmitry Kovanikov) ↑
- List concatenation pitfalls and Difference List
- Lazy evaluation order, WHNF, NF
- Pattern matching as evaluation
seq,deepseq,NFData- -XBangPatterns
foldrvs.foldlvs.foldl'- Irrefutable patterns
- Strict Haskell
- Space leaks
- Deforestation
- Stream Fusion
- Couple words about Rewrite Rules
STmonad (STRef,STArray)Criterionlooppackageilistpackagevectorpackage
Presentation: http://slides.com/fp-ctd/lecture-10#/
Lecture 11: Template Haskell and Lens (by Arseniy Seroka) ↑
- Lens
-XCPP- Template Haskell
- Boilerplating tuple code
- Haskell AST
- Splices
- -XQuasiQuotes
- Generate instances with
TH
Presentation: http://slides.com/fp-ctd/lecture-11#/
Lecture 12: Parallel and Concurrent Haskell (by Dmitry Kovanikov) ↑
- Advantages of immutability and purity
- Haskell parallelism with
rparandrseq - Spark pool, GC and sparks
- Threadscope
- Strategies
Parmonad examples- Difference between Parallelism and Concurrency
forkIOandMVar- Transactions:
STM,TVar Async
Presentation: http://slides.com/fp-ctd/lecture-12#/
Lecture 13: Comonads (by Arseniy Seroka) ↑
Comonadtype class & motivationIdentitycomonad
- 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#/
Lecture 14: Enterprise Haskell (by Arseniy Seroka) ↑
- Build tools
- Cabal
- Stack
- Nix
- Testing: HSpec, QuickCheck
- FFI
- GUI:
gtk(online demo) - Databases
- SQL
acid-state
Network.HTTPWeb.Scotty
Presentation: http://slides.com/fp-ctd/lecture-14#/
Lecture 15: Advanced type features (by Dmitry Kovanikov) ↑
- 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#/
Lecture 16: Idris (by Dmitry Kovanikov) ↑
- 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
Vectdata typedropforVectisEmpty : Vect n a -> BoolisSingleton : Bool -> Type- Open and closed doors
- Total version of
headfunction _|_-eliminator- Dependent pair and filter for vectors
- Type safe
printfimplementation
- 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 PureScriptAgda- Even more advanced monads: Indexed, Effect & Super- monads
- Zygohistomorphic prepromorphisms