type-machine: Simulating Structural Subtyping in Haskell

2025-08-20

Haskell programmers often struggle with data modeling, especially when dealing with record types with many fields. This blog post introduces type-machine, a Haskell library that leverages Template Haskell to simulate structural subtyping using type transformers and Is typeclasses. This simplifies record type manipulation and improves code efficiency. The library provides functions like pick, omit, and record, allowing for easy manipulation of record fields. Benchmarks demonstrate its performance advantages over alternative approaches.

Read more
Development Structural Subtyping

Type-safe Packed Data in Haskell: A Library Approach

2025-04-28

This blog post summarizes a paper to be presented at ECOOP 2025, introducing a Haskell library for type-safe and portable support of packed data. The library uses Template Haskell to generate code for packing, unpacking, and traversing packed data without requiring compiler modifications. Benchmarks show some speed improvements, but also reveal computational overhead from the monadic approach. Future work focuses on generating C code for performance optimization.

Read more
Development packed data