Skip to content

Instantly share code, notes, and snippets.

View nkpart's full-sized avatar

Nick Partridge nkpart

  • Brisbane, Australia
View GitHub Profile
@nkpart
nkpart / Joining CSV Tables in Haskell.md
Last active June 27, 2019 16:27
Joining CSV Tables in Haskell

Joining CSV Tables in Haskell

This article describes a technique for joining (in an SQL-style) lists of haskell data structures.

Maybe not the fastest, maybe not the smartest, but it works.

Why I like it

@nkpart
nkpart / Err.hs
Last active August 20, 2022 01:20
Lens, Prisms, and Errors.
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fwarn-missing-methods #-}
module Err where
import Control.Lens
import Control.Monad.Error
import Control.Monad.Error.Lens
-- Here is a fairly typical situation, where we have low level errors in certain