Brandon Chinn - Blog

Writing a GHC Plugin + Preprocessor for the first time — July 11, 2022

I just released a new library tasty-autocollect, which aims to solve a lot of minor annoyances I’ve had with tasty-discover. I won’t be going into too much detail about what it does (see the README instead), but I wanted to quickly go over some of the technical hurdles in implementing the library, and what I learned in this process.

Read More

Automating Fourmolu releases with GitHub Actions — May 19, 2022

One of my very first PRs into Fourmolu was setting up CI. Initially, I used Circle CI, as it’s what I’ve used in all my other open source repos, and Matt Parsons initially expressed a slight preference to it over GitHub Actions. But as I’ve gotten more familiar with GitHub Actions, and also as I’ve been trying to figure out how to automate GitHub releases, it seems like the tighter out-of-the-box integration between the CI and GitHub makes our lives a bit easier.

Read More

[RFC] EON: A simpler configuration format — April 23, 2022

Do you like YAML’s relative readability but dislike all the ways a user could shoot themselves in the foot? If you’re like me, you probably agree that it’s not the user’s job to remember that the file format they’re using automatically converts true, on, yes, or y to a boolean TRUE1. In other words, the semantics of the token true is not inherent to that token, but is determined by the field you’re currently configuring.

  1. Yes, YAML 1.2 only allows true or false now, but does your YAML parsing library using 1.2? If your library uses libyaml, you’re still on 1.1 

Read More

Oh, THAT'S how a monad is a monoid! — October 9, 2021

I’ve been coding in Haskell for about 5 years now and I feel very comfortable with monads, but I still balk at the oft-quoted definition1:

Read More

My ideal GraphQL framework for Haskell — August 4, 2021

I’m implementing a GraphQL backend for my personal project in Typescript because that’s where all the best GraphQL libraries are. Currently, I’m using apollo-server built on top of the graphql-js library, which I’ve been able to get working fine. But I often find myself wishing I could implement it in Haskell.

Read More

`forall`s in Data Types — July 23, 2021

This post contains a quick guide to using forall in a data type.

Read More

Testing Coverage of Template Haskell functions — August 6, 2020

In my aeson-schemas library, I implement quasiquoters that will generate Template Haskell to define type-level schemas and operations to extract data out of a JSON object. Then I would write tests that look like this:

Read More