- https://effpee.susanpotter.net/
- By Susan Potter (github:mbbx6spp, @SusanPotter, me at susanpotter dot net)
Effpee includes source code examples, teaching exercises, and course materials (e.g. slides, cheatsheets) developed by Susan Potter in her spare time based teaching typed functional programming with Haskell to mentees and coworkers over the last six years.
In development.
- Copyright © 2017-2019 Susan Potter.
- Source code and exercises are licensed under the AGPLv3.
- Slides, reference material and documentation are licensed under the license Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0).
You can distribute modified versions if you keep track of the changes and the date you made them. As per usual with GNU licenses, you must license derivatives under AGPL. It provides the same restrictions and freedoms as the GPLv3 but with an additional clause which makes it so that source code must be distributed along with web publication. Since web sites and services are never distributed in the traditional sense, the AGPL is the GPL of the web.
(Taken from TL;DRLegal here. Local license copy available etc/LICENSE-AGPLv3.txt.)
You are free to:
- Share: copy and redistribute the material in any medium or format
- Adapt: remix, transform, and build upon the material
Under the following terms:
- Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- NonCommercial: You may not use the material for commercial purposes.
- ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
- No additional restrictions: You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
Assumes you have Nix installed and then:
$ nix-env -iA cachix -f https://cachix.org/api/v1/install
$ cachix use mbbx6spp-effpee
To engage with the project maintainers, contributors, or via our official community forums please review our Code of Conduct provided at etc/CONDUCT.org or online.
If using Nix shell to load the development environment defined in shell.nix
you
should have no problem reproducing the intended environment for these learning
exercises. Please make sure you are using Nix 2.x or above (ideally 2.1+).
Otherwise you will need to install the following tools using your preferred package management tooling:
- Cabal binary (version 2.2.x)
- Cabal library (version 2.2.x.y)
- Glasgow Haskell Compiler (GHC, version 8.4.x)
- [optional] Haskell IDE Engine for GHC 8.4 (version 0.2.2+ for ghc-8.4.x)
- [optional]
ghcid
binary (v0.7+) - [optional]
hlint
binary (v2.1.8+) - [optional]
stylish-haskell
binary (v0.9+)
If not using Nix, you are kind of on your own in terms of official support but if you create an issue detailing the issues you experience we will do our best to help (at a minimum check if it is a fault of our teaching materials or auxilliary tool configuration or something local to the issue creator).
The following Haskell language extensions (as of GHC v8.4.x) will be used throughout this course:
NoImplicitPrelude
InstanceSigs
OverloadedStrings
ScopedTypeVariables
Other language extensions may be introduced on a per file/module basis.
To read more about specific Haskell language extensions you visit the Haskell wiki.
We assume some familiarity with programming in a modern general purpose programming language. While the teaching material is editor/IDE agnostic, we do suggest spending time before beginning to configure your favorite editor/IDE with the following:
- syntax highlighting
- CTAGS (see suggested setups for Emacs and vim here)
- hoogle editor integration (or via command-line)
- auto formatting via
stylish-haskell
(see Vim, Emacs, Atom, or VSCode integrations) - Haskell Vim plugins
- Haskell Emacs support
- Haskell’s Leksah IDE
- Haskell IDE Engine providing LSP support
We assume nothing except basic syntax highlighting and ability to run cabal
on the
command-line in your favorite terminal emulator. We also have no OS preference but
will only work on troubleshooting Nix development environment problems in depth.
Be hungry to learn, but also recognize that it will take time practicing via the exercises and self-testing your knowledge from the slides and reference material.
Adult learners who have not been enrolled in educational programs for over a year may find this Coursera course titled, ‘Learning to Learn’ informative.
We strongly recommend all exercises are attempted by the learner as they proceed through the topics available.
This repository is organized at a high-level like so:
etc/
- contains license and code of conduct information (or other repo metadata)slides/
- contains slide decks for various topics (see ‘Course outline’ section below for order suggestions)reference/
- contains reference materialssrc/
- contains source code exercisestest/
- contains test code that will validate the correctness of all your exercise solutionsbench/
- cotnains benchmarks that will validate the efficiency of some of your exercise solutions
- repository: https://github.com/mbbx6spp/effpee
- issues: https://github.com/mbbx6spp/effpee/issues
- pull requests: https://github.com/mbbx6spp/effpee/pulls
- website: https://effpee.susanpotter.net
- documentation: https://effpee.susanpotter.net/docs
We recommend the following sequence of material for those learning about typed pure functional programming:
TODO: Build sequenced list of slide decks and exercises.
Inside of your loaded Nix shell terminal:
$ cabal new-run test:all -- --pattern="Effpee.<module>"
Where <module>
might be something like ADT
, Functor
, Applicative
, Monoid
,
Monad
, etc.
Some exercises are testing your algorithmic design or mechanical sympathy with respect to fusion, inlining, or specialization.
TODO: document how to run benchmarks that determine algorithmic or efficiency correctness.
TODO: Document where exercises, slide deck or reference materials came from when relevant.
Short-list so far:
- Data61’s fp-course
- @nomeata’s Ready Haskell
- Graham Hutton’s Haskell book
- Richard Bird book on functional pearls of algorithmic design