GithubHelp home page GithubHelp logo

bbc / haskell-workshop Goto Github PK

View Code? Open in Web Editor NEW
7.0 9.0 2.0 100 KB

Haskell workshop that will hopefully contribute something back to the open-source community

License: Other

Haskell 100.00%
haskell book-club learning-by-doing learning-exercise learning-haskell

haskell-workshop's Introduction

Haskell Workshop

This is the BBC's Haskell Workshop group.

Installation

Download the Haskell Platform or stack

Editors

Vim

  • Syntastic supports Haskell syntax checking
  • Minimal syntax highlighting
  • Vim-one supports lightweight syntax highlighting for Vim
  • Ale Asynchronous Lint Engine. Works with numerous languages, but doesnt play nicely with other syntax checkers (e.g. Syntastic or neomake). Ale provides real time linting and syntax checking and can also provide autocompletion.

Prompt

Enter :set prompt "ghci> " in $HOME/.ghci for a more descriptive and permanent prompt.

Usage

In your terminal you can open the interpreter with ghci or stack ghci.

To compile a program, run ghc Filename.hs or stack ghc Filename.hs. This will create an executable in the current directory which you can run.

Core text

Learn You a Haskell for Great Good!

It is recommended a chapter a week is read and exercises completed.

Exercises

The exercises for the book are in the learnYouAHaskellExercises/src directory.

Each file corresponds to a chapter of LYAH.

  • C2StartingOut.hs
  • C3TypesAndTypeclasses.hs
  • C4SyntaxInFunctions.hs
  • C5Recursion.hs
  • C6HOF.hs

If you wish to do the exercises, create a folder within the root of this repo, e.g <name>/exercises and copy the contents of learnYouAHaskellExercises into your weeks folder.

Once you have loaded ghci, you can load each module/file into the interpreter,

$ cd <name>/exercises
$ stack ghci
Prelude> :l Filename.hs
-- Now you can run the functions in that module here

The exercises come in various degrees of difficulty, hopefully starting straightforward and then ramping up somewhat. If you try to run a exercises that you have not implemented yet, it will throw an error in the interpreter letting you know.

You can also run unit tests to check whether your implementation is correct. In the learnYouAHaskellExercises directory, run:

$ cd <name>/exercises
$ stack test

to run the tests.

Feel free to contribute if they are too easy, too hard, or you have any suggestions.

Suggested Learnings/Readings

Happenings

Miscellaneous

haskell-workshop's People

Contributors

imjacobclark avatar jensraaby avatar kazimir-malevich avatar koeniglear avatar matt-t-bbc avatar ptaylour avatar vaughandroid avatar violetamenendez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

gridl hadi1315

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.