Skip to content

Instantly share code, notes, and snippets.

@toddmohney
Last active October 27, 2017 18:14
Show Gist options
  • Save toddmohney/ecc37a0d6497f342d2e261af7d8a24ac to your computer and use it in GitHub Desktop.
Save toddmohney/ecc37a0d6497f342d2e261af7d8a24ac to your computer and use it in GitHub Desktop.
So, you've learnt you a Haskell? Now read these!

HTTP client libraries

wreq

If you're coming from Ruby, think HTTParty level of abstraction.

https://www.stackage.org/package/wreq

This is a great tutorial written by the creator. Definitely something to aspire to as a library author.

http://www.serpentine.com/wreq/tutorial.html


http-client

A lower level abstraction compared to wreq

https://www.stackage.org/package/http-client


Postgres client libraries

peristent, persistent-postgresql

The go-to relational database library

https://www.stackage.org/package/persistent

Nice explaination of how to work with Persistent

https://www.yesodweb.com/book/persistent


equeleto - a SQL DSL

Power up Persistent with Esqueleto - a DSL for SQL queries

https://ocharles.org.uk/blog/posts/2013-12-06-24-days-of-hackage-persistent-esqueleto.html

The Esqueleto library

https://www.stackage.org/package/esqueleto

Testing

Unit / Integration testing

HSpec

Inspired by RSpec. You'll find comfort in familiarity

https://hspec.github.io/ https://hackage.haskell.org/package/hspec

Property testing

QuickCheck QuickCheck - TBH, the Arbitrary package is the best part. For property testing, check out Hedgehog below https://hackage.haskell.org/package/QuickCheck


Hedgehog

Hedgehog https://hackage.haskell.org/package/hedgehog

Cool state-machine use case example http://teh.id.au/posts/2017/07/15/state-machine-testing/index.html

Testing strategies

5 ways to test a database in Haskell - loads of great information here! Consider the typeclass strategy in conjunction with what you've learned from the mtl style articles! https://functor.tokyo/blog/2015-11-20-testing-db-access

Couple your Chris Penner mtl style abstractions with this for testing effectful functions https://github.com/lexi-lambda/mtl-style-example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment