ruin: Pliable records

[ bsd3, data, library, records ] [ Propose Tags ] [ Report a vulnerability ]

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.

Flags

Manual Flags

NameDescriptionDefault
werror

Enable -Werror

Disabled

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

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1
Dependencies base (>=4.9 && <=5), binary (>=0.8.3.0 && <0.9), cereal (>=0.5.2.0 && <0.6), deepseq (>=1.4.2.0 && <1.5), ghc-prim (>=0.5.0.0 && <0.6), parsec (>=3.1.11 && <3.2), template-haskell (>=2.11.0.0 && <2.12), unordered-containers (>=0.2.7.1 && <0.3) [details]
License BSD-3-Clause
Copyright 2016 Nicolas Frisby
Author Nicolas Frisby
Maintainer nicolas.frisby@gmail.com
Category Data, Records
Source repo head: git clone https://github.com/nfrisby/ruin.git
Uploaded by NicolasFrisby at 2016-08-07T06:11:07Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1359 total (3 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]