# Haskell Programming Language

- Page: https://shared.btbytes.com/p/haskell
- Date: 2020-04-30
- Tags: haskell, programming-language, functional-programming

## Why Haskell

![](https://files.btbytes.com/images/i.imgur.com/gRXP4xu.jpg) [via](http://web.archive.org/web/20191015160806/https://skillsmatter.com/skillscasts/14649-lightning-talk-why-i-no-longer-use-haskell)

- [Why Haskell is beyond ready for Prime
    Time](http://intoverflow.wordpress.com/2009/01/13/why-haskell-is-beyond-ready-for-prime-time/)
- [Intro talk on Haskell by
    SPJ](http://skillsmatter.com/podcast/home/front-end-language-features)
- [Weaknesses of
    Haskell](https://www.quora.com/Haskell/What-are-the-main-weaknesses-of-Haskell-as-a-programming-language/answer/Jesse-Tov?srid=1sA&share=1)
- [Jocellyn's Blog - Why do I love Haskell more than Ruby?](http://jocellyn.cz/2014/07/22/why-do-i-love-haskell.html)
- [What Makes Haskell Unique, Part 1 - DZone Web Dev](https://dzone.com/articles/what-makes-haskell-unique)
* [10 Reasons to Use Haskell](https://serokell.io/blog/10-reasons-to-use-haskell)

## Why Not Haskell

- A [twitter thread](https://x.com/ChShersh/thread/1695764764247364027) in response to [Leaving Haskell behind](https://journal.infinitenegativeutility.com/leaving-haskell-behind); Aug 2023.

## Learning Haskell

- 2020-06-10: [Haskell for imperative programmers](https://www.youtube.com/playlist?list=PLe7Ei6viL6jGp1Rfu0dil1JH1SHk9bgDV) is a series of short videos (10-15 mins) that are very good!

- [albohlabs/awesome-haskell](https://github.com/albohlabs/awesome-haskell/blob/master/README.md) -- A curated list of amazingly awesome Haskell articles and talks for beginners.
- [soupi/haskel-study-plan: An opinionated list of resources for learning Haskell](https://github.com/soupi/haskel-study-plan); "This is great." -- Stephen Diehl
- [Learn Haskell](https://markkarpov.com/learn-haskell.html) from Mark Karpov.
- [bitemyapp's Learn Haskell collection](https://github.com/bitemyapp/learnhaskell)
- [Haskell for kids](http://cdsmith.wordpress.com/2011/10/06/haskell-for-kids-week-8/)
- [How to read Haskell like Python](http://blog.ezyang.com/2011/11/how-to-read-haskell/)
- [Beginning Haskell](http://web.archive.org/web/20140623000609/http://dev.stephendiehl.com/begin) tutorial by Stephen Diehl.
- [How to desugar Haskell code](http://www.haskellforall.com/2014/10/how-to-desugar-haskell-code.html)
- [What I Wish I Knew When Learning Haskell](http://web.archive.org/web/20130417043615/http://dev.stephendiehl.com/hask) by Stephen Diehl.
- [Pitfalls in Haskell](http://web.archive.org/web/20150125013203/http://users.jyu.fi/~sapekiis/haskell-pitfalls)
- [Things software engineers trip up on when learning Haskell | William Yao](https://williamyaoh.com/posts/2020-04-12-software-engineer-hangups.html)
- [Haskell reading list](http://www.stephendiehl.com/posts/essential_haskell.html) by  Stephen Diehl.
- Another [Haskell reading list](https://ghc.haskell.org/trac/ghc/wiki/ReadingList) on haskell.org.
- [Haskell the hard way](http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way/)
- [Tour of the Haskell Syntax](http://web.archive.org/web/20100612090438/http://cs.utep.edu/cheon/cs3360/pages/haskell-syntax.html)
- 2014/11/17 [How I start - Haskell](http://howistart.org/posts/haskell/1)
- 2014/11/17 [Holy Haskell project starter](http://yannesposito.com/Scratch/en/blog/Holy-Haskell-Starter/) -- an automatic project starter with sandbox, tests and all the fixins.
- 2014/11/18 [Intro to haskell](https://gist.github.com/wei2912/edb5929b56b23a7f4245)
- 2017/3/1 [how do you guys get anything done? : haskell](https://www.reddit.com/r/haskell/comments/5wb5qw/how_do_you_guys_get_anything_done/)
- [Teaching Haskell For Understanding - Google Slides](https://docs.google.com/presentation/d/1_I5mYXivG5NbOHnICld_Xo41uOyAT57Yade5qfz2toQ/edit#slide=id.g226ee758c3_0_267) by Julie Moronuki (author of Haskell Programming from first principles).
- 2017/12/4 [jagajaga/FP-Course-ITMO: Slides and other materials for functional programming lectures ITMO university](https://github.com/jagajaga/FP-Course-ITMO)
- 2018/2/20 [Haskell by Example](http://lotz84.github.io/haskellbyexample/) -- one-to-one corresponding examples to "Go by Example"
- 2018/6/5 [Codeworld: Haskell as a First Programming Language — Monday Morning Haskell](https://mmhaskell.com/blog/2018/6/4/bxit5i954uafn0n4gah3yrzcxnc3q6)
- [My Haskell Journey](http://cvlad.info/haskell/) from C#
- [A thin slice of Haskell](http://rahul.gopinath.org/sunblog/2007/04/22/a_thin_slice_of_haskell/)
* 2020/1/23 [For Beginners](https://argumatronic.com/posts/1970-01-01-beginners.html) by Julie Moronuki (aka `argumatronic`); The post date says Jan 1, 1970... sure... [reddit thread](https://redd.it/espttv) has good discussion.
* 2020/3/19 [Notes for 'Thinking with Types: Type-level Programming in Haskell', Chapters 1–5 | abhinavsarkar.net](https://abhinavsarkar.net/posts/twt-notes-1/) for <https://thinkingwithtypes.com/>

### Liquid Haskell

- [Liquid Haskell Tutorial](https://liquid.kosmikus.org/)

## Write Simple Haskell

* [Writing Simple Haskell](https://soupi.github.io/rfc/writing_simple_haskell/)

## Read Haskell code

* [Reading Simple Haskell](https://soupi.github.io/rfc/reading_simple_haskell/)
- [Peter Siebel attempts a Sudoku solver in Haskell](https://gist.github.com/gigamonkey/f1e3733ec8369a913e3f). [Sep 2015]
- [bravit/hid-examples: Examples to accompany the book "Haskell in Depth"](https://github.com/bravit/hid-examples)


## Video lectures and talks

- Interview with Graham Hutton on [ Haskell Foundation Podcast](https://haskell.foundation/podcast/6/); 2021-08
- [Zürich Friends of Haskell]https://www.youtube.com/channel/UC2zfPMH_srjxUN5EYrfIhCw) including [ZuriHac 2018 Beginner Session Saturday (uncut version) - YouTube](https://www.youtube.com/watch?v=revYLeEHWVw)
- [Erik
  Meijer](http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/Lecture-Series-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-1)
  teaches functional programming fundamentals. Video series on MSDN's
  channel9.
- [Haskell tutorial](https://www.youtube.com/watch?v=02_H3LjqMr8) by Derek Banas (recommended by [Gabriel Gonzalez](https://x.com/GabrielG439/status/662104064499421184)); related [code](http://www.newthinktank.com/2015/08/learn-haskell-one-video/) for the video.
- Michael O'Church's Summer Haskell Class slides:
    - [#1](https://docs.google.com/presentation/d/1K4M9Fzqa9FD2druXJrfRpHd6TTeyy3o3JguWHi1yWSc/edit#slide=id.p)
    - [#3](https://docs.google.com/presentation/d/1OUWDyCEDKlVFNmAn4Ja7HCkrFV_Kc1ucwyMEvOBCap8/edit)
    - [#4](https://docs.google.com/presentation/d/1FIZX9BF-isjDkAN4D96KpAdzBNJ9bVQ1sYh3bqF8DO8/)
    - [#5](https://docs.google.com/presentation/d/1Yx02f9OUSoaFgKCIg0uApZa9wuR-cIQk7b1Y_Hkg-4E/)
    - [Lab#1](https://www.youtube.com/watch?v=9ZxvLIJybzs) video
    - [Lab#2](https://www.youtube.com/watch?v=okRn7qNewwE) video
    - [Class notes](https://github.com/michaelochurch/summer-2015-haskell-class) on github.

## Courses

- [Functional Programming](https://www.cs.nott.ac.uk/~pszgmh/pgp.html) an introductory course on functional programming in Haskell by Graham Hutton.
- [Introduction to Haskell](http://www.seas.upenn.edu/~cis194/) at UPenn by Brent Yorgey, Joachim Breitner et al. This in my experience is the best introduction to Haskell in a classroom format you can find. The lecture notes are self-explantory and written in a conversational, easy to follow manner.
- [CMSC498V](https://nikivazou.github.io/CMSC498V/) -- "Advanced Functional Programming Languages (Fall 2017)" taught by Dr Niki Vazou at UMD.


## Developing with Haksell


- [Haskforce][haskforce] -- Haskell plugin for IntelliJ IDEA Community Edition [2014/10]
- A detailed guide to using [Haskell-emacs](http://web.archive.org/web/20120213121005/http://chrisdone.com/posts/2011-08-21-haskell-emacs.html)    mode (2011).
- [Haskell Development on Emacs](http://web.archive.org/web/20140708151105/http://tim.dysinger.net/posts/2014-02-18-haskell-with-emacs.html) by Tim Dysinger (2014).
- [Haskell Best Practices for Avoiding "Cabal Hell"](http://softwaresimply.blogspot.com/2014/07/haskell-best-practices-for-avoiding.html)
-[Experience report developing in Haskell ](http://abailly.github.io/posts/cm-arch-design.html) by CTO of Capital Match; Nov 2015.
- [An opinionated guide to Haskell in 2018](https://lexi-lambda.github.io/blog/2018/02/10/an-opinionated-guide-to-haskell-in-2018/) [Feb 2018]
- [Infinite Negative Utility: Some Notes About How I Write Haskell](https://blog.infinitenegativeutility.com/2017/12/some-notes-about-how-i-write-haskell) [Dec 2017] -- Good section on how to use list comprehensions.
- [The Haskell User experience](http://rickdzekman.com/thoughts/the-haskell-user-experience/) [Aug 2015]
- [Introducing Haskell to a company](https://alasconnect.github.io/blog/posts/2018-10-02-introducing-haskell-to-a-company.html)
- [I Released A Haskell Product!](https://jezenthomas.com/i-released-a-haskell-product/)
* [Development Tools for Haskell](http://blog.vmchale.com/article/hs-tools); Nov 2019.

## Resources

- [TechBookHunter/Free-Haskell-Books: A curated collection of free eBooks about Haskell](https://github.com/TechBookHunter/Free-Haskell-Books)
- [Code World](https://code.world/) -- an online playground for writing and executing Haskell code.
- [Phil Wadler's video lectures at University of Edinburgh](https://www.youtube.com/playlist?list=PLtRG9GLtNcHBv4cuh2w1cz5VsgY6adoc3)
- [Magazine](http://themonadreader.wordpress.com/)
- [Bob Ippolito's "Haskell for Erlangers"](http://bob.ippoli.to/haskell-for-erlangers-2014/#/title); 2014. Good code examples of IO monads, and monads.


## Blogs

- [quchen/articles](https://github.com/quchen/articles)
- [Randomhacks/haskell](http://www.randomhacks.net/articles/tag/Haskell)
- [Building Monad Transformers - Part 1 - Jakub Arnold Blog](http://blog.jakubarnold.cz/2014/07/22/building-monad-transformers-part-1.html)
- [Haskell for OCaml programmers](http://science.raphael.poss.name/haskell-for-ocaml-programmers.html)
- [ocharles.org.uk](https://ocharles.org.uk/blog/)-- [24 days of Hackage 2012/2013]
- [tel.github.io](http://tel.github.io/) -- [types of data,  mutable algos in immutable langs]
- [Justin Le](http://blog.jle.im/)
- [Haskell for all](http://www.haskellforall.com/)
- [Blank.Denum](http://www.blaenkdenum.com/notes/haskell/)
- [Liam O'Connor](http://liamoc.net/archive.html)
- [Kwang's Haskell Blog - Home](https://kseo.github.io/)

### Blog posts / articles

- [A bt client in Haskell](http://web.archive.org/web/20151128064337/http://blog.chaps.io/2015/10/05/torrent-client-in-haskell-1.html)
- [using stack for haskell dev](http://seanhess.github.io/2015/08/04/practical-haskell-getting-started.html),
  from [Sean Hess](http://seanhess.github.io/) (Practical Haskell
  series).
- [PROGRAMMING WITH EFFECTS](http://www.cs.nott.ac.uk/~pszgmh/monads) by Graham Hutton, January 2015
- [Using Mondads](http://seanhess.github.io/2015/08/18/practical-haskell-using-monads.html) by Sean Hess is a good one on Monads.
- [quchen/articles](https://github.com/quchen/articles)
- [Distributed Systems in Haskell :: Will Yager](http://yager.io/Distributed/Distributed.html)
- [Monads to Machine Code](http://web.archive.org/web/20160104195023/http://www.stephendiehl.com/posts/monads_machine_code.html)
- [Rest API in Haskell | maciek.io](http://maciek.io/rest-api-in-haskell/)
- [Haskell Success Stories - Michael Snoyman's blog](http://www.snoyman.com/blog/2017/04/haskell-success-stories)

## Meta lists

- [Papers every haskeller should read : haskell](http://www.reddit.com/r/haskell/comments/2blsqa/papers_every_haskeller_should_read/)
- [palimi - Recommended Haskell reading and watching](http://web.archive.org/web/20200611120757/https://secure.plaimi.net/~alexander/haskell.html)

## Editors

- [Haskell idea plugin](https://github.com/Atsky/haskell-idea-plugin)
- [Haskell for Mac](http://haskellformac.com/)
- [Code.world](https://code.world/)
- [Haskell-tools](http://web.archive.org/web/20160730174028/http://haskelltools.org/) A GHC based toolset for Haskell programming.
Currently featuring Haskell-tools Refact, a refactoring framework.
- [HyperHaskell](https://apfelmus.nfshost.com/blog/2018/08/06-hyper-0-2.html) -- is a graphical Haskell interpreter (REPL), not unlike GHCi, but hopefully more awesome. You use worksheets to enter expressions and evaluate them. Results are displayed using HTML.

## Papers

- [Practical type inference for arbitrary-rank types](http://research.microsoft.com/en-us/um/people/simonpj/papers/higher-rank/putting.pdf)
- Best monad tutorial? [Tackling the Awkward Squad](http://research.microsoft.com/en-us/um/people/simonpj/papers/marktoberdorf/mark.pdf)


## My Notes

What are some of the low-friction ways of using Haskell?

-   Pandoc -- add custom elements, extract metadata from documents.
-   Hakyll -- build custom site renderers.
-   Shake -- build system where Make isn't sufficient.

If you get `can't load .so/.DLL for` when installing cabal package:
put `shared: True` in  `~/.cabal/config`


### Cabal

- [cabal - the simple guide](http://web.archive.org/web/20150325104642/http://katychuang.com/cabal-guide)
- [(2) Introduction to Cabal - YouTube](https://www.youtube.com/watch?v=a7R-2vtPLDM)

Sandbox:

        cabal sandbox init
        cabal init #to init a new proj.

remember to
    `export HASKELL_PACKAGE_SANDBOX=.cabal-sandbox/x86_64-osx-ghc-7.6.3-packages.conf.d`
inside the cabal sandbox.

- How to [write a Haskell program](http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program)
- How to [develop packages with Cabal](http://www.haskell.org/cabal/users-guide/developing-packages.html)


## jupyter notebook

See `www.btbytes.com/stack.yaml` for dependencies.

```
stack new myproj
cd myproj
stack init
brew install zmq
stack exec ipython -- notebook
```


Note: iHaskell binary is installed in `~/.local/bin`:

```
Copied executables to /Users/pgowda/.local/bin/:
- ihaskell
```

(not sure if the above two lines are actually important ...)


### Libraries and tools

- [packunused: Tool for detecting redundant Cabal package dependencies | Hackage](http://hackage.haskell.org/package/packunused)

### Haskell Reference

- Real World Haskell. Free [online version](http://book.realworldhaskell.org/).
- [Beginning Haskell: A Project-Based Approach](http://www.amazon.com/Beginning-Haskell-Alejandro-Serrano-Mena/dp/1430262508/)
[Read Haskell Tutorial and Cookbook | Leanpub](https://leanpub.com/haskell-cookbook/read)

[haskforce]: http://carymrobbins.github.io/intellij-haskforce/

## Misc

- [What Haskellers like about Python](https://redd.it/3hjywq)
- [Criticisms of Haskell](https://redd.it/3rnbqw)

## Links

- [What is `->` in Haskell?](https://www.quora.com/What-is-in-Haskell/answer/Bartosz-Milewski?srid=hEKH&share=1)

## Projects in haskell

- [Glot.io](https://glot.io/) -- an open source pastebin with runnable snippets and API. [Source code](https://github.com/prasmussen/glot)
