• Stars
    star
    624
  • Rank 71,995 (Top 2 %)
  • Language
    Haskell
  • License
    Other
  • Created about 7 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Applied Functional Programming Course - Move from exercises to a working app!

Applied Functional Programming Course

Build Status

CSIRO's Data61 Logo

This is a new course, so there are going to be rough edges. We invite you to submit issues or pull requests if you find errors or have suggestions on how to improve it.

This course is designed to be run in a class room with instructors, but we would like to make it suitable for self-study as well. Although undertaking this course outside of the workshops will increase the difficulty somewhat, we do not discourage it and invite suggestions on how to make the course more approachable.

If you do attempt this on your own and find yourself completely lost, then you may come find us on IRC on libera.chat in #qfpl or #fp-course.

You:

  • Have completed, or are capable of completing, the FP Course.
  • Have a few months self-study to your name.
  • Want to know how to build larger applications with statically typed FP.
  • Are willing to accept that a web application is a sufficient choice.
  • Can write the canonical function of type: Applicative f => [f a] -> f [a]

We:

  • Have constructed a sequence of goals of increasing difficulty.
  • Have provided a framework within which to apply these goals.
  • Have included relevant components of larger applications:
    • Package dependencies
    • Project configuration
    • Application testing & building
    • Encoding / Decoding messages (JSON & Binary)
    • Persistent storage integration
    • App state & configuration management
    • Error handling & reporting
  • Will utilise both type & test driven development techniques.
  • Will explain architectural and design trade-offs when appropriate.

Setup build tools:

Each level is a self-contained Haskell module, containing incomplete, or as yet undefined, data types and functions.

We recommend using nix develop or nix-shell to get a shell with the necessary tools. You can also use cabal or stack.

Cabal

If you're using version >=3.0 of cabal-install (use cabal --version to find out), then you don't need to previx the commands with v2-:

$ cd path/to/applied-fp-course
$ cabal configure --enable-tests
$ cabal build <levelN>-exe
$ $EDITOR src/<LevelN>/README.md

Nix

If you would like to use a Nix Shell:

$ cd path/to/applied-fp-course
$ nix-shell  # or `nix develop`, if you use flakes
$ cabal build <levelN>-exe
$ $EDITOR src/<LevelN>/README.md

ghcid

If you have ghcid installed, run ghcid -c 'cabal repl' to get a terminal with up-to-date type errors, which are refreshed on every save.

Stack

A stack.yaml configuration is provided on a best-effort basis. The authors do not use stack and cannot promise to be able to resolve stack-related issues. Though we will do our best. :)

Please note...

These lessons are designed to be completed with an instructor as part of the Data61 Applied Functional Programming Course. You are of course welcome to clone the repository and give it a try, but you may find the tasks more difficult. If you have any questions we can be contacted in the #qfpl IRC channel on libera.chat.

Subsequent lessons may contain spoilers, don't cheat yourself out of the experience!

There is a README.md file in each Level module folder that will provide instructions about what the goal is for that specific level.

  • Level 01 : Simple hello world web app.
  • Level 02 : Define our application spec with types!
  • Level 03 : Testing & tools
  • Level 04 : Database layer (sqlite-simple)
  • Level 05 : Better error handling through ExceptT
  • Level 06 : Add some flexible configuration
  • Level 07 : ReaderT & refactoring

-- In Development...

  • Level 08 : Lenses & "classy mtl" monad transformers

-- Maybe...

  • Level 09 : Add session controls (login, logout) and a protected route. So we can have something that resembles application state. For the purposes of modelling the state machine and implementing some property based tests.

Bonus Content

Extension material that doesn't feel like it belongs to the main progression lives in the bonus subdirectory.

More Repositories

1

hpython

Haskell language tools for Python
Python
157
star
2

sv

Comma (and other) separated values
Haskell
77
star
3

state-machine-testing-course

Course for learning how to apply property-based state-machine testing
Haskell
64
star
4

tasty-hedgehog

Tasty integration for the Hedgehog property testing library
Haskell
38
star
5

propagator-examples

Haskell
35
star
6

reflex-realworld-example

Haskell
33
star
7

reflex-tutorial

Haskell
29
star
8

papa

Reasonable Haskell default import
Haskell
26
star
9

reflex-dom-svg

Helper package for working with SVG in Reflex
Haskell
21
star
10

parley

Beginner friendly demo of a blog comments app
Haskell
20
star
11

reflex-workshop

Haskell
20
star
12

hedgehog-fn

Function generation for Hedgehog
Haskell
18
star
13

coordinate

A representation of latitude and longitude
Haskell
15
star
14

dollaridoos

A typesafe wrapper around monetary values represented as numeric values, allowing only sensible operations.
Haskell
14
star
15

reflex-realworld-workshop

A guided workshop through implementing the realworld demo app in obelisk.
JavaScript
14
star
16

reflex-brick

Build terminal UIs using reflex and brick
Haskell
14
star
17

reflex-dom-canvas

HTML5 Canvas Integration for Reflex Dom
Haskell
13
star
18

tasty-wai

Haskell
13
star
19

reflex-basic-host

A basic reflex host for backend work
Haskell
13
star
20

ban-instance

Declare that a typeclass instance should not exist.
Haskell
12
star
21

sample-nix-data-pipeline

Nix
10
star
22

reflex-dom-storage

Haskell
10
star
23

reflex-dom-datepicker

A Date Picker UI widget for Reflex
Haskell
9
star
24

reflex-backend-socket

Reflex support for socket-based applications
Haskell
8
star
25

leaderboard

A leaderboard webapp
Haskell
7
star
26

reflex-backend-servant

Haskell
7
star
27

initial-final

HTML
6
star
28

tasty-hedgehog-coverage

Haskell
6
star
29

diffygif

Haskell
5
star
30

contravariant-functors-ylj-2018

YOW Lambda Jam 2018 - Contravariant Functors: The Other Side of the Coin
TeX
5
star
31

reflex-backend-websocket

Haskell
5
star
32

lens-dependent-map

Haskell
4
star
33

check

Generalised data validation
Haskell
4
star
34

consy

Replacing `Data.List` with `Control.Lens.Cons`
Haskell
4
star
35

propagators-bfpg

Propagator talk by George Wilson (2017-11-14)
TeX
4
star
36

church-maybe

Church encoded Maybe
Haskell
4
star
37

reflex-log

Haskell
4
star
38

reflex-backend-wai

Reflex support for WAI applications
Haskell
4
star
39

reflex-dom-template

Haskell
4
star
40

reflex-gl-demo

Demonstration program wiring together Reflex and OpenGL. Presented at Compose Melbourne on 2019-09-02.
Haskell
4
star
41

elm-workshop

Workshop for getting into Elm
Elm
4
star
42

reflex-dom-validation

Haskell
3
star
43

invariant-extras

Some extra functionality for invariant functors
Haskell
3
star
44

tagsoup-navigation

Lenses and Zipper for tagsoup
Haskell
3
star
45

parsers-megaparsec

`parsers` instances for Megaparsec
Haskell
3
star
46

intro-to-reflex-compose

Haskell
3
star
47

sys-process

A replacement for System.Exit and System.Process
Haskell
3
star
48

semialign-extras

Additional operations built atop the `semialign` universe.
Haskell
3
star
49

waterflow-problem

Twitter waterflow problem
Haskell
3
star
50

intuition-for-propagators-slides

slides for George Wilson's Melbourne :: Compose 2019 talk
TeX
3
star
51

repa-runtime

Haskell
3
star
52

reflex-dom-ausgov-uikit

Haskell
2
star
53

casa-abbreviations-and-acronyms

CASA Abbreviations and Acronyms
Haskell
2
star
54

e6b

E6B Flight Computer functions
Haskell
2
star
55

blog

QFPL blog
JavaScript
2
star
56

fp-in-ruby

FP in Ruby talk materials
Ruby
2
star
57

dissidence

HTML
2
star
58

aviation-weight-balance

Weight and Balance in aviation
Haskell
2
star
59

contravariant-operators

Haskell
2
star
60

applied-fp-course-answers

Haskell
2
star
61

waargonaut-succinct-ds

Succinct Data Structure support for the Waargonaut package.
Haskell
2
star
62

variant1

Polymorphic variant for unary type constructors
Haskell
1
star
63

state-machine-testing

@ajmccluskey's state machine testing talk at YLJ 2018
Nix
1
star
64

fixplate-lens-example

An example of using classy prisms & variants with `fixplate`
Haskell
1
star
65

reflex-binary

Haskell
1
star
66

reflex-course

Haskell
1
star
67

intro-to-reflex-bfpg

A reflex talk given at BFPG
Haskell
1
star
68

growing-a-datepicker

Associated posts and code for the blog series 'Growing a Date Picker in Reflex'
Haskell
1
star
69

record1

Extensible record for unary type constructors
Haskell
1
star
70

tt

Table Tennis ladder
Nix
1
star
71

hedgehog-laws

hedgehog properties to test typeclass laws
Haskell
1
star
72

reindent

(extremely experimental) command line tool to change and make consistent the indentation of python code
Haskell
1
star
73

pandoc-dsl

For building pandoc documents
Nix
1
star
74

dotagrams

Library for drawing propagator diagrams with graphviz
Haskell
1
star
75

variantT

Polymorphic variant for functor transformers
Haskell
1
star
76

bool-expr

An investigation into the effectiveness of correct-by-construction syntax trees
Haskell
1
star
77

geodetic-types

Geodetic types
Haskell
1
star
78

ghc-extensions-talk

@ajmcmiddlin's YLJ 2019 talk on GHC language extensions
CSS
1
star
79

cargo-culting-lenses-ffp

A fast paced intro to using the haskell ``lens`` package
HTML
1
star
80

svfactor

Haskell
1
star
81

gh-stats

GitHub statistics for an organisation's repos.
Haskell
1
star
82

or

Maybe (Either a b) ^ Either (Either a b) ((,) a b) ^ Maybe (Either (Either a b) ((,) a b))
Haskell
1
star
83

plated1

Uniplate-style traversals for nested (non-regular) datatypes
Haskell
1
star
84

typeclass-the-ultimate-ad-hoc

TeX
1
star
85

intro-to-reflex-brisjs

A reflex talk given at BrisJS
Haskell
1
star