Coder Social home page Coder Social logo

aiden01 / haskell-exercises Goto Github PK

View Code? Open in Web Editor NEW

This project forked from i-am-tom/haskell-exercises

1.0 0.0 0.0 131 KB

A little course for Habito engineers to learn about some of the more obscure GHC extensions.

License: MIT License

Haskell 100.00%

haskell-exercises's Introduction

GHC exercises ๐Ÿš€

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 new-repl

Build

$ stack build
$ cabal new-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 new-repl"

haskell-exercises's People

Contributors

elliotdavies avatar jordymoos avatar jwhiles avatar moleike avatar zooeymiller avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.