ruin: Pliable records

[ bsd3, data, library, records ] [ Propose Tags ]

ruin is a DSL for working with record types. It focuses on converting between conventionally-declared record types and supporting named function arguments.

  • Uses -XOverloadedLabels, so that #x is a first-class label for the field named x.

  • Provides GHC.Generics defaults.

  • Named arguments: \[rna|x y z] -> (x,y,z) inhabits ("x" :@ a,"y" :@ b,"z" :@ c) -> (a,b,c).

  • Relies on -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.R provides anonymous record types where the order of fields is irrelevant.

See the Data.Ruin module for an overview.


Manual Flags


Enable -Werror


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],
Dependencies base (>=4.9 && <=5), binary (>= && <0.9), cereal (>= && <0.6), deepseq (>= && <1.5), ghc-prim (>= && <0.6), parsec (>=3.1.11 && <3.2), template-haskell (>= && <2.12), unordered-containers (>= && <0.3) [details]
License BSD-3-Clause
Copyright 2016 Nicolas Frisby
Author Nicolas Frisby
Category Data, Records
Source repo head: git clone
Uploaded by NicolasFrisby at 2016-08-07T06:11:07Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1316 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-08-07 [all 1 reports]