Extensible Records

Version on this page:0.7.0@rev:1
LTS Haskell 22.26:0.14.3
Stackage Nightly 2024-06-22:0.14.3
Latest on Hackage:0.14.3

See all snapshots vinyl appears in

MIT licensed by Jonathan Sterling
Maintained by [email protected]
This version can be pinned in stack with:vinyl-0.7.0@sha256:ff1f3ee91f70293ac087ce118bcffb41ee126ab14e9a1db2222bca59cf4bab3c,2956
Depends on 2 packages(full list with versions):
Used by 4 packages in lts-11.22(full list with versions):

Extensible records for Haskell with lenses.



  • Simplified match
  • Added Data.Vinyl.Curry


Added a CoRec (co-record) type constructed in the same style as the existing Rec type for records. A CoRec is an open sum type: a value of CoRec [a,b,c] is either an a, a b, or a c. In contrast a Rec [a,b,c] includes an a, a b, and, a c.


Added a concise Show instance for Const.


Ported the tutorial to haddocks (andrewthad)


Added utilities for working with the FieldRec type.


Vinyl 0.5 combines the generality of Vinyl 0.4 with the ease-of-use of previous versions by eschewing the defunctionalized type families and just using plain type constructors; Vinyl 0.4-style records can be recovered in most cases in a modular manner without baking it into the fabric of Vinyl itself.

Also new in 0.5 is a unified lens-based approach to subtyping, coercion and projection.


Vinyl 0.4 is a big departure from previous versions, in that it introduces a universe encoding as a means to generalize the space of keys from strings to any arbitrary space. This means that you can have closed universes for your records.

For details on how to use the new Vinyl, please see tests/Intro.lhs or view Jon’s talk at BayHac 2014, Programming in Vinyl.