What's new
2022-03-01
We’ve added a page on
Seq
and an explanation of the basics of time complexity.2022-02-15
Applicative lesson 10, homomorphism and composition, is now available. As I mentioned yesterday, these lessons have taken a lot of work to organize. The turning point for me, what made everything fall together into a coherent story, is realizing that we can view homomorphism as the central concept for all four laws.
2022-02-14
I am very pleased to announce the release of lesson 9 of the Applicative series. In this lesson, we write property tests for the Applicative laws using Hedgehog. This episode includes a refresher on how to combine Hedgehog generators, and along the way we get to see some fun stuff like ambiguous type signatures and rank-N types. We write properties for three of the four laws, leaving the interchange property as an exercise. At the end of the lesson, we have a Hedgehog property group that we will use in the next two lessons to give a thorough discussion of what the laws mean and examples of what it means to break them.
2021-08-02
The Alternative typeclass is the last episode in our series on monoids.
2021-03-18
Another function we love: toIntegralSized, a safe way to convert between all the various types of whole numbers.
2021-03-17
As our latest Joy of Haskell monograph, Sockets and Pipes, is nearing completion, we have released the coupon that enables all Typeclasses members to download the book for free.
2020-12-30
We’ve added a search page to help you find what you’re looking for on Type Classes. It uses the …
2020-12-05
Last month we quietly released the Tweet history project, a series about reading CSV files in which we rewrite a program …
2020-12-05
A disturbing perspective pervades the practice of programming. “Everybody writes garbage code.”
2020-11-11
I was having trouble running
cabal update
on my machine and, having figured out a solution using Nix, thought I should write the solution down.2020-11-03
Here we show you some boring Haskell, a shell script to generate some files we need to build a project.
2020-08-16
We now offer a free introduction to Haskell crash course with video and full transcriptions available for each lesson. We have presented this course twice at ZuriHac and decided to make it permanently accessible here on our web site.
2020-06-24
In this lesson we look at why an important data structure called Map is not a valid instance of Applicative. We…
2020-06-22
This series gives a comprehensive introduction to basic GHCi commands and usage.
2020-04-15
In this addition to the Applicative section of the Functortown series, we continue our discussion of applicative functor composition by…
2020-04-06
This series begins with an introduction to GHC extensions, what they are and how to use them. That page is connected to a series …
2020-03-11
We’ve expanded the partial type signatures lesson. It discusses what kinds of things can be inferred with the extension, …
2020-03-05
After a brief look at
IO
as an applicative functor, we explore what it means that functors compose, paying special attention to the …2020-03-04
The :main command in GHCi runs your program’s
main
action. But did you know that you can also pass it command-line …2020-01-23
Folding: A common task, and a common first step on the road to thinking functionally! Thanks to Jesus E. …
2020-01-22
While Chris has previously written about the ways in which Stack and Nix are competing tools, we’ve found ourselves a few times using Stack and Nix, together. …
2019-12-18
A monitoring server demonstrates using queues to communicate between threads, and using sockets to communicate between …
2019-12-16
The Applicative series continues its study of the notion of applicative functors as contexts for …
2019-11-24
A lot of software has to deal with time in some form or another. Moments in time covers basic parsing and …
2019-11-21
We’ve been giving a lot of thought lately to how to present some of the more exotic language …
2019-11-11
We’ve added two new lessons to the the Validation course, thus making all of the book’s content available to Type Classes members. One lesson is about using
coerce
safely and effectively for newtype
-heavy code, while the other is an introduction to the lens
library through the prisms in the validation
package.2019-11-07
This week, we’ve added content to two of our courses, Functortown and Validation. The Functortown lesson is called Zippy …
2019-10-22
We’ve received a number of great Hacktoberfest contributions to the Phrasebook. So far, we’ve added two new pages of free …
2019-09-30
We have decided to open the Haskell Phrasebook to community contributions. We especially encourage contributions from people who have never contributed to a Haskell project before but would like to.
2019-09-24
Often we find ourselves needing a pair of related functions: 1. to encode some simple sum type as a …
2019-09-02
In Haskell, all types are known statically at compile time. Or are they? We don’t use
Dynamic
, but …2019-08-30
Since we had a Phrasebook entry for the hashable library, it seemed appropriate to add a page on cryptonite to …
2019-08-30
Functortown is back with a lesson on the rest of the
Applicative
class, the two “bird operators,” (<*)
and (*>)
. Through three examples, we explore the sequencing…2019-08-17
Today we add five new pages to the series on iterators, bringing the total up to 11 pages and …
2019-08-14
The standard library for GHC Haskell includes at least four functions that perform a basic function …
2019-08-12
The header art for the Validation course depicts a portion of the Mandelbrot set. We’ve written a lengthy discussion of the Haskell code …
2019-07-30
We are excited to announce The Haskell Phrasebook. Taking an approach similar to Go by Example, it emphasizes how to get started writing programs quickly. In a departure from our usual style, this project does not explain everything in full detail; the Phrasebook’s role is only to be a traveler’s starting point and quick reference.
2019-07-18
One of our first video series was about how we run Type Classes on Amazon EC2 using NixOS. We’re starting to expand our Nix …
2019-06-30
You may have noticed some recent colorful additions to our page headers, such as on the Validation and Web …
2019-06-28
2019-06-25
2019-06-21
We’re writing the Python course in a slightly different style from most of Type Classes, because it is aimed at a more focused audience. The idea is that if you are already familiar with Python, then we want to leverage as much of your existing Python knowledge as possible as you learn Haskell. For example, we’re not including quite as many type signatures in our explanations as we normally would, and we defer the introduction of some aspects of Haskell to minimize the amount of patience required if you just want to answers to questions of the form ‘I know how to do this thing in Python; how do I do it in Haskell?’ This post is about one particular small choice regarding range syntax.
2019-06-21
The latest Python lesson is all about zipping, a notion also sometimes referred to as aligning. We discuss three Python functions:
zip
,…2019-06-17
Type Classes has been in business for a year. To celebrate and share our success, annual memberships are half-off through June 30.
2019-06-12
Quick site design update: We’ve added navigation buttons at the top of pages that are part of a series.
2019-06-12
A monoid is a type along with a binary associative operation and an identity element. We’ve written a …
2019-06-12
Our guide to the many uses of underscore has been amended to include its usage with the type applications extension, which does…
2019-06-01
The Python course continues with a discussion of
map
(with one iterator argument, or with multiple) and …2019-05-29
We added documentation for the newtypes in the
Data.Semigroup
module, and with that the semigroup page is …2019-05-11
To concatenate two Python iterators, we use
chain
. The corresponding Haskell function is (++)
. The chain
…2019-05-09
The latest lesson in the Python course is about functions that produce simple never-ending iterators. The ability to represent concepts like “counting upward from one” and “repeating an item ”…
2019-05-02
We previously discussed in the iterators lesson how Python iterators relate to Haskell lists. If you’re …
2019-04-29
We’ve added an article comparing Python iterators to Haskell lists. There’s also a new lesson of Functortown. Lesson 9, You got monoids in my functors!, goes further into Applicative functors. This lesson is supplemented by a reference page on Semigroup.
2019-03-29
This week’s theme is applicative functors. The eighth lesson of Functortown is called Mapping a Maybe function; it starts off with a concise practical example that brings the
Maybe
applicative to our attention. We’ve also written the reference page on the ApplicativeDo
extension.2019-03-24
The thirteenth and final lesson of the Web Servers course is out today! It introduces
pipes
. Our latest featured function is null
.2019-03-19
We just started a new section of the site called “Featured functions” which will house quick overviews of functions that we think deserve some extra love and attention. The first two featured functions are mapMaybe and intercalate. Web Servers lesson 12 is about connection persistence – reusing the same socket for multiple HTTP requests. We write two versions of the server, one using lazy I/O and the other using strict
ByteString
s.2019-03-11
Two new reference pages: A lengthy discussion of the coerce function, what it’s for, and how to use
newtype
s more effectively; and a note of historical interest on datatype contexts which addresses a common beginner question about typeclasses.2019-03-03
We have new lessons in two of our ongoing courses. In the fourth installment of the Timepieces course, Julie examines how the hierarchy of
fltkhs
is meant to mirror that of FLTK. The latest lesson in the Web Servers course is about parsing message bodies. And we’ve added to our documentation of GHC language extensions with an article on NumericUnderscores
.2019-02-24
This week we’re excited to bring you a new lesson in the native GUI course. In this lesson, Chris uses gtk3, Pango, and TVars to transform the blank application window into a clock. And the latest lesson in the Functortown course, in which Julie introduces the laws of the Bifunctor class and goes into more detail about how ranges and shrinkage work when you’re property testing with hedgehog.
2019-02-15
Course updates: Functortown lesson 6, More than a sum; Web Servers lesson 10, Interpreting request headers.
2019-02-12
Learn to love deriving: deriving strategies, stock deriving extensions, the
via
strategy, and why instance deriving is important when using monad transformers.2019-02-03
Everyone who has an active Type Classes subscription as of today can get the book for free on Leanpub; check your account page under the section entitled “Leanpub coupons”. The link can be used twice, so you can give a copy to a Haskell-curious friend.
2019-01-11
We’ve released Web Servers lesson 9, Parsing requests, which continues our study of HTTP and gives a practical introduction to Attoparsec. We also continue to show how to ask GHCi for help with guides for using the beloved typed holes feature, all the uses of underscores, and warnings related to unused values.
2018-12-24
Type Classes now supports annual subscriptions and country-based discounts. We’ve added pages on rigid type variables and BlockArguments.
2018-12-20
This week we made some billing changes: There’s now an annual billing option in addition to monthly, and we now offer region-based discounts. We also took some time to publish a lot of the code that we use to work the Stripe API. You can find the code in the typeclasses/stripe repository on GitHub.
2018-12-14
This week, more reference pages and new lessons in two of our ongoing courses! Topics include: Threads, levity polymorphism, pattern type signatures, bimap, POSIX signal handling, drawing with Cairo.
2018-12-07
We start our new series, Timepieces, with getting started with fltkhs. In Functortown lesson 4, breaking the laws!, Julie introduces using the Hedgehog library. We also have an overview of parsing libraries, an intro to concepts related to primitives, and more reference pages.
2018-12-01
This week we released the third lesson in Functortown, Laws and orders, and the eighth lesson in Web Servers, The Never-ending response, and announce the beginning of a new course.
2018-11-24
This week we released the second lesson in Functortown, More common functors, and the seventh lesson in Web Servers, Chunking the message body.
2018-11-16
This week we are beginning the Functortown course, a complete introduction to all kinds of functors. We also have added two new lessons in the Web Servers course since our last blog post, and we added a site index so the tags on posts are now clickable!
2018-10-29
Our first Template Haskell article focuses on one narrow use case: Compile-time evaluation of constant expressions. Because we care dearly about avoiding sources of runtime errors wherever possible.
2018-10-22
We’ve restructured the site to make it easier to find content, added two JavaScript articles (one, two), and published some packages to Hackage. What’s next: Starting the Functortown course and continuing the Web Servers course.
2018-10-05
Julie presented a workshop on maximizing the useful information you can get from GHCi. It wasn’t recorded, but we’re working on getting all that information onto the site for our subscribers.
2018-09-03
Check out our new Haskell tip, entitled Strict, lazy, and builder – It covers the various string types in the
text
and bytestring
packages.2018-09-01
Julie gave the keynote at C∘mp∘se :: Melbourne and we launched our new career as Haskell pamphleteers!
2018-08-11
We’ve started releasing the web servers course, which will explain a lot about HTTP and how to write network applications in Haskell.
2018-07-18
I chose the “Validation” course to be our flagship course on Type Classes because it’s material I’ve tested with meetup groups. Taking the same starting point as one of my more popular blog posts, it successively refactors relatively simple code until we’ve learned about several of Haskell’s most important features.
2018-07-10
We’ve added additional video formats, so videos should now be working on most devices. This post includes some details on how the HTML
<video>
tag supports multiple formats and how we generate DASH and HLS encoded versions of our videos.2018-06-26
Haskell Summer School has wrapped up, and we are back to work. Recordings of our classes are available.
2018-06-11
Julie just taught the beginner Haskell track at ZuriHac, and this week we are both teaching classes at Haskell Summer School in Poznań, Poland.
2018-05-31
We are in the final stages of editing the initial course and project, and that content is starting to go live.
2018-04-09
“A monoid is a pipeline of functions”? Be careful not to get lost in a particular example for a typeclass.
2018-04-07
Since our initial Type Classes announcement, we’ve been asked a number of questions about payments and planned content. Find out what’s available now, when we’ll start taking payments, and what you can expect as a subscriber.
2018-03-30
On February 24, 1988, Philip Wadler introduced the idea of type “classes” for Haskell, as a solution to the problem of overloading. Thirty years later, we present Type Classes: a series of focused video courses on Haskell, Nix, and related subjects.