• Stars
    star
    992
  • Rank 46,173 (Top 1.0 %)
  • Language
    Haskell
  • License
    Mozilla Public Li...
  • Created about 4 years ago
  • Updated 4 months ago

Reviews

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

Repository Details

๐Ÿ‘ฉโ€๐Ÿซ ๐Ÿ‘จโ€๐Ÿซ Learn Haskell basics in 4 pull requests

learn4haskell

Learn4Haskell

๐Ÿšจ Important notice: This course continues BAU even after Hacktoberfest ๐Ÿšจ

You can find the results of Hacktoberfest 2020 for Learn4Haskell in the following blog post:


It's the time of the year when thousand pull requests are starting to float in the air like a leaf on the wind ๐Ÿƒ

It's Hacktoberfest! And we are happy to be part of this fantastic event.

Usually, people contribute to projects within the communities they spend most of their time already and don't try to go out of those boundaries. But why not use this time to learn something challenging, something fresh, something that you never had time for?

You can get the benefits of Hacktoberfest while learning something new fascinating concepts โ€“ Functional Programming with Haskell.

And we're here to help!

  • 4 Pull Request to get the T-Shirt or plant a tree as stands in the Hacktoberfest rules.
  • 4 Pull Request to learn to program in Haskell.
  • 4 Pull Request to blow your mind.

Table of Contents

What is Learn4Haskell

Learn4Haskell is a GitHub-located course that will get you into the Haskell Functional Programming world in just 4 Pull Requests.

This course is organised as a coding project. So you can complete the course without needing to exit your editor.

This works in the following way. When you decide to start the project, all you need to do is to fork the project. We have prepared 4 separate modules โ€” chapters. Each part contains educational material and lots of examples that we provide in a simple form that doesn't require you to know anything about functional programming beforehand. Also, each chapter contains several exercises on everything that is explained by us. You can solve the tasks on your way and at the end open a PR to your fork with this chapter's solution and summon us (by shouting out our nicknames there). We would be happy to give you feedback on your progress, explain problematic concepts or just support you mentally!

Each chapter contains unique information and covers different topics. We suggest going through them in order. However, if you think that some of the chapters are already familiar to you, feel free to skip onto the next one. If you would like to talk to us, you can even rely on PRs for the chapter you have questions about.

Chapters are stuffed with information but are aimed to be completed without additional resources. You may spend an evening per chapter, but we swear it's worth it!

At the end of the course, you should be able to independently create and read basic Haskell code and understand Monads and other famous concepts of Functional Programming.

Course Plan

Here is a more concrete plan of the mystical 4 Chapters we prepared for you. These are the highlights of each part.

  • Chapter One โ€“ What is Haskell, what are its particularities, basic Haskell syntax, functions, types, expressions.
  • Chapter Two โ€“ FP concepts in the language, immutability, pattern matching, recursion, polymorphism, laziness, Higher-ordered functions, partial applications, eta-reduction.
  • Chapter Three โ€“ Focus on Types. Type aliases, ADTs, Product types and Records, Sum types and Enumerations, Newtypes, Typeclasses.
  • Chapter Four โ€“ Kinds. Three monsters of functional programming: Functor, Applicative, Monad.

Goals

We created the Learn4Haskell project in pursuit of the following goals:

  • Help others to learn Haskell
  • Give a beginner-friendly and self-consistent course with theory and practice in the same place
  • Explain Haskell topics before each task, but strive to be concise and useful at the same time. It's a tough balance!
  • Help people who want to participate in Hacktoberfest and Open-Source, but also want to learn new things during this process
  • Provide review and feedback on solutions, so people are never alone in this challenging yet exciting journey!
  • Give people who completed this course all the necessary understandings to be able to work with basic projects that use standard features. We also intend that you have a strong basis on what they should do to be able to continue their functional programming studies.

Who can participate

Everyone!

We welcome everyone and would be happy to assist you in this journey!

The course is intended for people who don't know Haskell or know only language basics, though.

If you are already an experienced Haskell developer and have come here for learning advanced topics, this course might not be that for you. But you still can help us! Your feedback and suggestions would be helpful for us as well as for the language newcomers who decide to work with this course.

What you will get from this course

This course has many benefits upon completion. Check them out to be sure that it fits your expectations!

Participation in this course would give you:

  • 4 Pull Requests required for Hacktoberfest completion
  • Basic knowledge of the most functional programming language
  • Understanding of the functional programming concepts that you would be able to use in your day-to-day life afterwards
  • On-the-fly feedback and help from experienced Haskell developers and educators
  • Interesting challenges
  • Fun!

Honestly, this seems like a pretty rad deal!

How to get started

Starting to learn Haskell with Learn4Haskell is a piece of cake!

  1. Fork this repository.
  2. โš ๏ธ Add the hacktoberfest topic to your fork. Otherwise, your PRs won't count.
  3. Enable GitHub Actions for your forked repository.
  4. Install the Haskell compiler.
  5. Open the src/Chapter1.hs file, and start learning and solving tasks!
  6. After you finish the first chapter (or any other chapter, or even if you are stuck in the middle), open Pull Request to your fork with the solution and mention @vrom911 and I would be on our way for the review.

Note, that you should open a PR for your fork of this repo, not this repo. Everyone has their solutions to the included tasks, and they don't mix together well in one repo ๐Ÿ™‚

However, if you find some bugs or problems in this repo, you can open a PR to Learn4Haskell directly. We appreciate any help and feedback!

Learn4Haskell has 4 chapters that you can walk through and submit 4 pull requests to complete the Hacktoberfest event (or just for knowledge and your enjoyment).

So, you can start right now with forking. Following this we'll describe how you can install all the necessary items to be able to run this course locally.

Installing Haskell

If you're on Windows, install the haskell-dev and make packages using Chocolatey.

choco install haskell-dev make
refreshenv

If you're on Linux or macOS, then the process is easy:

  1. Install ghcup and follow ghcup instructions for successful installation (remember to restart your terminal afterwards to avoid an unknown ghcup command error on the next step).

  2. Install the latest version of the Haskell compiler โ€” GHC โ€” and the Cabal build tool. After you install ghcup, it is easy to install the rest with a few commands from your terminal

    ghcup install ghc 9.2.4
    ghcup set ghc 9.2.4
    ghcup install cabal 3.2.0.0
  3. Run cabal update to fetch the latest info about Haskell packages.

Haskell IDE

If you don't have any IDE preferences, we recommend installing Visual Studio Code with the Haskell plugin. The mentioned plugin would give you everything required to immediately start coding with Haskell.

Gitpod

Open in Gitpod

Gitpod is a VSCode-based Web IDE. With it, you can get a Haskell environment out-of-the-box. It's free to use up to 50 hours per month.

Just prepend gitpod.io# to your repo URL and you are ready to go. It will take some time to initialize the workspace for the first time it opens. It only keeps changes under /workspace, and it will be deleted after a period of inactivity unless it's pinned.

How to develop

The course assumes that you install Haskell tooling (GHC and Cabal), edit code in the corresponding chapters, run GHCi (Haskell interpreter, explained in the course) from the root of this project and load your chapters to check your code. Don't worry, each chapter explains all the needed information!

We also provide a Makefile with commands to test your solutions locally with the included prepared test-suite. We have also configured the CI using GitHub Actions on Learn4Haskell to check your answers at GitHub automatically!

To run all tests for Chapter One:

make test-chapter1

To run tests only for basic tasks for Chapter One (without the advanced tasks):

make test-chapter1-basic

Similar commands are provided for all chapters from One to Four.

Who we are

I am Veronika (@vrom911) and I drive this open source organisation โ€” Kowainik. We have a lot of open source projects and libraries in Haskell that are used in the Haskell community. We are also working on a lot of tutorials and guides in Haskell and mentoring people who are keen to learn Haskell as well.

We are passionate about Functional Programming and Haskell in particular. But at the same time, we understand how difficult it can be to get into all these ideas on your own. That is why we've decided to start this course to help newcomers. With the interactive learning process and live discussions we've included, Haskell will not be that scary. We will do our best so that it especially won't be the case for you or any others participating here!

How can you help

You can help us by supporting us on Ko-Fi or via GitHub sponsorship program:

We also appreciate any feedback on our course a lot! You can submit your feedback using the following form:

More Repositories

1

relude

๐ŸŒ€ Safe, performant, user-friendly and lightweight Haskell standard library
Haskell
698
star
2

summoner

๐Ÿ”ฎ ๐Ÿ”ง Tool for scaffolding batteries-included production-level Haskell projects
Haskell
695
star
3

stan

๐Ÿ•ต๏ธ Haskell STatic ANalyser
Haskell
565
star
4

cake-slayer

๐Ÿฐ๐Ÿ”ช Architecture of Haskell backend applications
Haskell
131
star
5

tomland

๐Ÿ Bidirectional TOML serialization
Haskell
122
star
6

awesome-cabal

๐Ÿ’ซ A curated list of awesome resources for the Haskell Cabal build tool.
118
star
7

typerep-map

โšก๏ธEfficient implementation of Map with types as keys
Haskell
100
star
8

hit-on

:octocat: Kowainik Git Workflow Helper Tool
Haskell
76
star
9

prolens

๐Ÿ‘“ Profunctor based lightweight implementation of Lenses
Haskell
74
star
10

smuggler

๐Ÿšฃ Smuggle all imports
Haskell
71
star
11

shellmet

๐Ÿš Out of the shell solution for scripting in Haskell
Haskell
70
star
12

policeman

๐Ÿ‘ฎ Haskell PVP adviser
Haskell
69
star
13

validation-selective

๐Ÿ’‚โ€โ™‚๏ธ Lightweight pure validation based on Applicative and Selective functors
Haskell
66
star
14

colourista

โ€Ž๏ธโ€๐ŸŒˆ Convenient interface for printing colourful messages
Haskell
66
star
15

treap

๐Ÿƒ ๐ŸŒณ ๐Ÿ‚ Efficient implementation of the implicit treap data structure
Haskell
63
star
16

membrain

๐Ÿง  Type-safe memory units
Haskell
61
star
17

issue-wanted

๐Ÿท Web application to help beginners to start contributing into Haskell projects
Haskell
59
star
18

eio

๐ŸŽฏ IO with Exceptions tracked on the type-level
Haskell
58
star
19

type-errors-pretty

๐Ÿ’„๐Ÿž Combinators for writing pretty type errors easily
Haskell
55
star
20

extensions

๐Ÿ‘… Parse Haskell Language Extensions
Haskell
48
star
21

awesome-haskell-sponsorship

๐Ÿ’ Haskell profiles to sponsor
47
star
22

slist

โ™พ๏ธ Sized list
Haskell
46
star
23

autopack

๐Ÿ“ฆ Custom Setup to automate package modules discovery
Haskell
32
star
24

containers-backpack

๐ŸŽ’ Backpack interface for containers
Haskell
32
star
25

kowainik.github.io

๐ŸŽ‚ Kowainik web page
HTML
30
star
26

hintman

๐Ÿ”ซ GitHub application to suggest hints
Haskell
27
star
27

unlift

๐Ÿ›— Typeclass for monads that can be unlifted to arbitrary base monads
Haskell
25
star
28

idris-patricia

๐ŸŒ‹ Idris implementation of patricia tree
Idris
22
star
29

org

๐Ÿ“œ ๐Ÿ“’ Place for organization guidelines and workflows
Mustache
21
star
30

life-sync

๐Ÿ”„ Synchronize personal configs across multiple machines
Haskell
21
star
31

trial

โš–๏ธ Trial Data Type
Haskell
20
star
32

piece-of-cake-slayer

๐Ÿฐ๐ŸดTemplate project based on the cake-slayer architecture library
Haskell
19
star
33

first-class-patterns

First class patterns and pattern matching, using type families
Haskell
17
star
34

hakyll-shortcut-links

โœ‚๏ธ Hakyll shortcut-links in markdown files
Haskell
11
star
35

crocodealer

๐ŸŠ Manage GitHub organization files, labels, issues
Haskell
9
star
36

amicabal

๐Ÿฅฐ Friendly Haskell config format (cabal) helper and linter
Haskell
9
star
37

shortcut-links

๐Ÿ–‡๏ธ Link shortcuts for use in text markup
Haskell
8
star
38

github-graphql

๐Ÿ•ธ๏ธ GraphQL bindings to GitHub API
Haskell
7
star
39

.github

๐Ÿ’Š Default health files
7
star
40

seaweed

๐ŸŒŠ Create your fancy CV in different formats
Haskell
5
star
41

toml-benchmarks

๐Ÿ“Š Benchmarks for Haskell TOML decoding and encoding libraries
Haskell
4
star
42

outdator

Haskell outdated dependencies bot
Haskell
3
star
43

stan-action

GitHub Action for Stan โ€“โ€“ Haskell Static Analysis tool
Dockerfile
3
star
44

hintman-target

Target dummy for hintman
Haskell
3
star
45

hash-store

Hash as cache
Haskell
2
star
46

treasure-keeper

๐Ÿ’ฐ Accounting tool
Haskell
2
star
47

ppa

Ubuntu PPAs for Kowainik tools
Makefile
1
star
48

stack-full

See README for more info
Haskell
1
star
49

tomlerone

๐Ÿ—ป Tomland Online: TOML format online checker based on tomland library
Haskell
1
star
50

mysql-not-so-simple

MySQL not so simple
Haskell
1
star
51

cabal-full

See README for more info
Haskell
1
star
52

app-version

Get your application version
Haskell
1
star