All Projects → i-am-tom → Haskell Exercises

i-am-tom / Haskell Exercises

Licence: mit
A little course to learn about some of the more obscure GHC extensions.

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Haskell Exercises

Ghc Grin
GRIN backend for GHC
Stars: ✭ 123 (-75%)
Mutual labels:  ghc, functional-programming
Plt
λΠ Programming Language Theory
Stars: ✭ 4,609 (+836.79%)
Mutual labels:  functional-programming
Groovy
Apache Groovy: A powerful multi-faceted programming language for the JVM platform
Stars: ✭ 4,359 (+785.98%)
Mutual labels:  functional-programming
Haskell Code Explorer
Web application for exploring and understanding Haskell codebases
Stars: ✭ 454 (-7.72%)
Mutual labels:  ghc
Kickstarter Prelude
A collection of useful Swift tools that are used in the Kickstarter apps.
Stars: ✭ 437 (-11.18%)
Mutual labels:  functional-programming
Gluesql
GlueSQL is quite sticky, it attaches to anywhere.
Stars: ✭ 463 (-5.89%)
Mutual labels:  functional-programming
Fpo
FP library for JavaScript. Supports named-argument style methods.
Stars: ✭ 419 (-14.84%)
Mutual labels:  functional-programming
Scalaz
Principled Functional Programming in Scala
Stars: ✭ 4,518 (+818.29%)
Mutual labels:  functional-programming
Hof
Higher-order functions for c++
Stars: ✭ 467 (-5.08%)
Mutual labels:  functional-programming
Dry Monads
Useful, common monads in idiomatic Ruby
Stars: ✭ 453 (-7.93%)
Mutual labels:  functional-programming
Mostly Adequate Guide
Mostly adequate guide to FP (in javascript)
Stars: ✭ 21,330 (+4235.37%)
Mutual labels:  functional-programming
Koazee
A StreamLike, Immutable, Lazy Loading and smart Golang Library to deal with slices.
Stars: ✭ 446 (-9.35%)
Mutual labels:  functional-programming
Deepdarkfantasy
A Programming Language for Deep Learning
Stars: ✭ 463 (-5.89%)
Mutual labels:  functional-programming
Nix
Nix, the purely functional package manager
Stars: ✭ 5,291 (+975.41%)
Mutual labels:  functional-programming
Easylambda
distributed dataflows with functional list operations for data processing with C++14
Stars: ✭ 475 (-3.46%)
Mutual labels:  functional-programming
Topshell
TopShell - a purely functional, reactive scripting language
Stars: ✭ 422 (-14.23%)
Mutual labels:  functional-programming
Arrow
Λrrow - Functional companion to Kotlin's Standard Library
Stars: ✭ 4,771 (+869.72%)
Mutual labels:  functional-programming
Vavr
vʌvr (formerly called Javaslang) is a non-commercial, non-profit object-functional library that runs with Java 8+. It aims to reduce the lines of code and increase code quality.
Stars: ✭ 4,616 (+838.21%)
Mutual labels:  functional-programming
Fasy
FP iterators that are both eager and asynchronous
Stars: ✭ 488 (-0.81%)
Mutual labels:  functional-programming
Bartosz Basics Of Haskell
Code and exercises from Bartosz Milewski's Basics of Haskell Tutorial
Stars: ✭ 483 (-1.83%)
Mutual labels:  functional-programming

GHC exercises 🚀

For solutions, please see the Exercises.hs modules inside the answers branch.

OK, you know your monoids from your monads. You know how to write a terminal application or two. What's next? What are these language extensions that keep being mentioned? How "type-safe" can you really be?

This repository, I hope, will provide some stepping stones. We'll go through extensions one at a time, and build up a richer vocabulary for talking about Haskell programs, and look to move our assertions up into types, where they can be verified at compile time.


What this isn't.

This is a deep dive into GHC extensions, the power that each one gives us, and how we can combine extensions to achieve very strong guarantees at compile-time. This is not based around concepts; there won't be sections on "dependently-typed programming", or "generic programming", though these concepts will turn up throughout as we dig deeper into the extensions.

If you're interested in something more project-based, I absolutely, 1000% recommend Thinking with Types, written by Sandy Maguire. It is a fantastic resource, and one on which I already rely when explaining concepts to others.

Contents

  1. GADTs
  2. FlexibleInstances
  3. KindSignatures
  4. DataKinds
  5. RankNTypes
  6. TypeFamilies
  7. ConstraintKinds
  8. PolyKinds
  9. MultiParamTypeClasses
  10. FunctionalDependencies

Setup

Assuming you have Cabal or Stack setup, you should be able to navigate to any of the exercise* directories, and run your usual commands:

Repl

$ stack repl
$ cabal repl

Build

$ stack build
$ cabal build

It's going to make it a lot easier to iterate through the exercises if you cabal install ghcid or stack install ghcid. Just as above, once this is done, you can navigate to the exercise directory and run it with your preferred repl command:

$ ghcid -c "stack repl"
$ ghcid -c "cabal repl"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].