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.
Development
Structural Subtyping