We’ve had some feedback that it’s been hard to find the content on Type Classes. We started out in May by outlining a skeleton of our full ambitions for what we wanted the site to ultimately become, and then have been gradually filling in parts of it. The unfortunate result was that it became hard to discern which parts of the site were done and which parts were only in planning. So we restructured the site around the content that we have now, and our immediate next steps, brought more direct links to finished videos to the home page, and raised the list of recent news posts to the top to help point out new content.

The site is now organized into four top-level categories:

  • Courses - This is now the place for all of our longer-form content designed to be consumed in more than a single sitting, including what we had previously categorized under Projects. None of this content is going into any of the books that we immediately have in planning.
  • Reference - There are articles (and sometimes a video) on a single focused Haskell topic. They aren’t meant to be consumed in any particular order. We link to these pages to supplement other parts of the site (like the courses).
  • Transitions - Most learners of Haskell already know another language; this content is designed to show you direct connections between Haskell and a language you already know.
  • Tooling - This part isn’t the focus of Type Classes, but it’s here because there are a handful of software tools we feel are really important to help you be a productive Haskeller.

New JavaScript articles

New in the Transitions area, we have two JavaScript-related pages:

  1. A JavaScript WAT and monoidal folds - Compares the JavaScript function Math.min with the Haskell functions min and minimum, explains why they’re different, and how the concepts of folds and identities explains why JavaScript made the choice to define Math.min() as Infinity.
  2. Identities and monoidal folds - Goes deeper into monoids, what it takes to get an identity value that is as polymorphic as possible, and explores other ways that Haskell could have defined its minimum function.

OSS work

While working on Type Classes, we’ve been quietly publishing some small packages We like small packages. to Hackage. We plan to write articles here about the design and use of these libraries (as well as other parts of the Haskell ecosystem), and how we used them to make Here are some of the things we’ve published so far:

  • scotty-path-normalizer - An action in the Scotty web framework that interprets /, ., and .. in URLs and issues redirects to URLs in canonical form.
  • d10 - Defines various types representing the digits 0-9, and gives quasi-quoters that let you write “digit literals”. This project arose out of a need for a digit type in the Web Servers course. We’ll use this as an example when we write about how to use QuasiQuotes as an alternative to writing partial functions.
  • assoc-list - An association list conceptually signifies a mapping, but is represented as a list of key-value pairs [(a, b)]. As with the d10 package, this is an exploration of the design space that provides a few similar modules that do the same things in slightly different ways. This one was also motivated by the Web Servers course, because the headers in an HTTP message are an association list.
  • aws-cloudfront-signed-cookies - Our videos are hosted by Amazon CloudFront, which has a clever auth mechanism: When you subscribe to Type Classes, we send your browser a cookie that contains a cryptographic signature. CloudFront then uses the presence of this cookie to determine whether to grant access to requests for videos. Most AWS-related things can be accomplished in Haskell with amazonka, but it doesn’t seem to have any code for generating these cookies, so we wrote our own.

Coming next

  • Julie is working on Functortown lesson 1
  • Chris is working on Web Servers lesson 5
  • The rest of our work has been focused on content for the Joy of Haskell Desk Reference. The content that we’re writing for that book, sometimes in lengthier form, is all ending up in the Reference and Tooling areas of this site.