FP Complete

The Hidden Dangers of Haskell’s Ratio Type

Here’s a new Haskell WAT?! Haskell has a type Rational for working with precisely-valued fractional numbers, and it models the mathematical concept of a rational number. Although it’s relatively slow compared with Double, it doesn’t suffer from the rounding that’s intrinsic to floating-point arithmetic. It’s very useful when writing tests because an exact result can be predicted ahead of time. […]

Hiring Haskell Developers


FP Complete is actively seeking multiple engineers to work with our globally distributed team of software engineers. This blog post is to announce a new job opening for a developer role focused on Haskell development. At all times you can find an up-to-date listing of job openings on our jobs page. Below is the job information […]

Intermediate Training Courses – Haskell and Rust

I’m happy to announce that over the next few months, FP Complete will be offering intermediate training courses on both Haskell and Rust. This is a follow up to our previous beginner courses on both languages as well. I’m excited to get to teach both of these courses. More details below, but cutting to the […]

Tying the Knot in Haskell

This post has nothing to do with marriage. Tying the knot is, in my opinion at least, a relatively obscure technique you can use in Haskell to address certain corner cases. I’ve used it myself only a handful of times, one of which I’ll reference below. I preface it like this to hopefully make clear: […]

The Pains of Path Parsing

I’ve spent a considerable amount of coding time getting into the weeds of path parsing and generation in web applications. First with Yesod in Haskell, and more recently with a side project for routetypes in Rust. (Side note: I’ll likely do some blogging and/or videos about that project in the future, stay tuned.) My recent […]

Philosophies of Rust and Haskell

Rust is a systems programming language following fairly standard imperative approaches and a C-style syntax. Haskell is a purely functional programming language, innovating in areas such as type theory and effect management. Viewed that way, these languages are polar opposites. And yet, these two languages attract many of the same people, including the engineering team […]

Pattern matching

I first started writing Haskell about 15 years ago. My learning curve for the language was haphazard at best. In many cases, I learnt concepts by osmosis, and only later learned the proper terminology and details around them. One of the prime examples of this is pattern matching. Using a case expression in Haskell, or […]

Error handling is hard

This blog post will use mostly Rust and Haskell code snippets to demonstrate its points. But I don’t believe the core point is language-specific at all. Here’s a bit of Rust code to read the contents of input.txt and print it to stdout. What’s wrong with it? fn main() { let s = std::fs::read_to_string(“input.txt”).unwrap(); println!(“{}”, […]

Collect in Rust, traverse in Haskell and Scala

There’s a running joke in the functional programming community. Any Scala program can be written by combining the traverse function the correct number of times. This blog post is dedicated to that joke. In Rust, the Iterator trait defines a stream of values of a specific type. Many common types provide an Iterator interface. And […]

Reducing Maintenance Costs With Functional Programming

Most of the discussions we have in the software industry today revolve around developer productivity: How do we make it possible for fewer developers to produce more software in less time? Reducing the upfront costs and delivering quickly is essentially the mantra of the startup world: Move fast and break things. However, the vast majority […]