News

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 content a bit more now, with some introductory discussion of what Nix is, and a comparison between a Nix file and a Makefile which if you’re familiar with Make will help convey what you might use Nix for.

You may have noticed some recent colorful additions to our page headers, such as on the Validation and Web servers courses. More than mere decorations, these are also Haskell demonstrations! We have discussions of how they were generated in our Art section. Today we’ve added a page on the Julia set that you see at the top of our home page, produced using the fractal-hs package.

The reference series on algebras that began with Semigroup has escalated to Semiring. We’ve given the semiring page an extensive update that includes a more in-depth discussion of *tropical semirings* and some useful thoughts on why you might care about the semiring of types.

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.

`zip`

function in Python and HaskellThe latest Python lesson is all about *zipping*, a notion also sometimes referred to as *aligning*. We discuss three Python functions: `zip`

, `zip_longest`

, and `enumerate`

. The Haskell translations of the examples involve the `these`

package, which we’ve discussed previously in Functortown.

Courses

*Courses* are series about a particular topic meant to be watched in order. Some will be more theory-and-fundamentals oriented, while some will focus on building a project. Each course has clearly identified prerequisites and goals, to help you choose which courses are right for you.

`Text`

and `ByteString`

types.`Functor`

, `Bifunctor`

, `Applicative`

, `Traversable`

, `Monad`

, `Contravariant`

, and `Profunctor`

, with motivating examples and discussions of what each is good for, the laws governing each, and how to property test instances.`fltkhs`

and Chris using `gtk3`

. Each lesson explains aspects of the library, illuminates important Haskell concepts such as concurrency primitives and implicit parameters, and gives you some basis for comparing libraries for your own native GUI application projects.`Maybe`

, `Either`

, and `Validation`

types brings, as well as using `newtype`

to differentiate inputs. We also demonstrate the difference between `Applicative`

and `Monad`

.Reference

Each article explains a single, sometimes small, Haskell topic in detail. Some articles include video. Haskell reference pages supplement, but are independent of, the courses and projects. Haskellers of any level will find them useful as reference.

`ReaderT`

from the `transformers`

library and use it to illustrate type aliases, newtypes, and various approaches for typeclass deriving, using the `GeneralizedNewtypeDeriving`

and `DerivingVia`

GHC extensions.*primitive*,

*lifted*, and

*boxed*types.

*language extensions*, ranging from very simple syntactic extensions to very complex type drama. This article helps you understand what extensions are, how to use them, and which ones are especially useful as your first extensions.

`TypeApplications`

lets you visibly apply functions to type arguments. We demonstrate several common use cases.`ScopedTypeVariables`

lets you extend the scope of a type variable over a whole function, including its subexpressions.Transitions

Switching to Haskell doesn’t mean you have to start over learning how to code. Our *transitions* content is geared toward explaining how concepts from other languages relate to Haskell, so you can advantage of what you already know as you get started in Haskell. We focus on Java, JavaScript, and Python.

`Math.max() < Math.min()`

and what it has to do with monoids. This is a two-part article covering Haskell’s folds (compared to JavaScript `reduce`

), monoids, and identity values.`scotty`

, a Haskell web framework.Tooling

This section covers topics that aren’t about the Haskell language itself, but about software that helps you be more productive with it.

`:type`

command and never be at a loss for knowledge of types`ghcid`