ruin is a DSL for working with record types. It focuses on
converting between conventionally-declared record types and
supporting named function arguments.
-XOverloadedLabels, so that
#xis a first-class label for the field named
\[rna|x y z] -> (x,y,z)inhabits
("x" :@ a,"y" :@ b,"z" :@ c) -> (a,b,c).
-XDuplicateRecordFields; the generic defaults only work if record selector names do not have distinguishing prefices.
Custom type errors, such as
ruin: Could not find the field `x' in the type ...
Data.Ruin.Rprovides anonymous record types where the order of fields is irrelevant.
Data.Ruin module for an overview.