row-types
Open Records and Variants
https://github.com/dwincort/row-types
| LTS Haskell 24.17: | 1.0.1.2@rev:1 | 
| Stackage Nightly 2025-10-31: | 1.0.1.2@rev:1 | 
| Latest on Hackage: | 1.0.1.2@rev:1 | 
row-types-1.0.1.2@sha256:4d4c7cb95d06a32b28ba977852d52a26b4c1f695ef083a6fd874ab6d79933b64,3071Module documentation for 1.0.1.2
Row-Types
Row-types is a library of open records and variants for Haskell using closed type families and type literals (among other things…). See examples/Examples.lhs for a literate Haskell file that functions as an overview of how this library can be used, and check out the website for further examples.
Available on Hackage.
This work is a branch from CTRex [1,2] with other inspiration from data-diverse [3]. My thanks to the authors and contributors of those libraries!
[1] https://wiki.haskell.org/CTRex 
[2] https://hackage.haskell.org/package/CTRex/docs/Data-OpenRecords.html 
[3] https://hackage.haskell.org/package/data-diverse
Changes
1.0.1.2 [2021-09-10]
- Update Stack to use GHC 8.10.7
- Fix a few warnings
- Minor updates to support GHC 9.0.1
1.0.1.1 [2021-09-09]
- Improved type checking performance on Diff and Merge (Thanks ak3n!)
1.0.1.0 [2021-05-06]
- Fixed a critical bug in certain values in Dictionariesthat could cause segfaults.
- Reimplemented and simplified Subset.
- Adjusted basic type families to better handle simple cases (affected families are .\,Extend,.+,.\/,.//).
- Export mapSingleAinData.Row.Variants.
- Improved kind polymorphism and simplify a few constraints (Thanks Strake!).
- Improved type checking performance (Thanks UlfNorell!)
1.0.0.0 [2020-09-12]
This release has many breaking changes, specifically to metamorph and some functions related to Variant, hence the major version bump to 1.0.  However, users that only use basic features of records may not notice a difference.
- Removed metamorph'andbiMetamorph'in favor of generalizingmetamorphover choice of bifunctor.
- Removed “unsafe” functions (unsafeRemoveandunsafeInjectFrontfromRecordsandunsafeMarkVarandunsafeInjectFrontfromVariants).
- Removed Switchclass, reimplementing theswitchfunction usingBiForall.
- Swap the order of the result of calling trial,multiTrial, andsplit.
- Added new functions to Records:lazyRemove,curryRec,(.$),zipTransform,zipTransform',traverse,traverseMap,distribute, andcoerceRec.
- Added new functions to Variants:fromLabelsMap,traverse,traverseMap, andcoerceVar.
- Added Dictionariesmodule, full of axioms that are helpful for usingmetamorph. Moved axioms fromInternaltoDictionaries(in some cases, the type variable order has changed).
- Added ApSingletype family as well aseraseSingle,mapSingle, anderaseZipSingle(thanks Jordan Woehr!).
- Improved error messages.
Note: GHC 8.4 and earlier are no longer officially supported in row-types 1.0.0.0.
0.4.0.0 [2020-05-20]
- Renamed toNativetotoNativeGeneralandtoNativeExacttotoNativefor records and likewise forfromNativefor variants.
- Added a type family NativeRowwhich, when given any generic type that can go throughfromNative, is equal to the row-type of the resulting record/variant. Note thatNativeRowis defined separately (and differently!) for records vs variants, so it is exported at theData.Row.Records/Variantslevel but not atData.Row.
- Added coerceRecandcoerceVarto coerce the row-types of records and variants respectively.
- Exposed BiForallinData.Row,Data.Row.Records, andData.Row.Variants
- (Internal) Rewrote internal Genericcode to use an associated type family instead of a standalone one.
Note: GHC 8.2 and earlier are no longer officially supported in row-types 0.4.0.0.
0.3.1.0 [2020-01-29]
- Added “native” classes as exports for RecordsandVariants(e.g.,ToNative,FromNative)
- Added more example hs files.
0.3.0.0 [2019-05-28]
- Added HasFieldandAsConstructorinstances (from generic-lens) forRecandVarrespectively.
- Added record-overwrite function .//.
- Added Genericinstances for Rec and Var.
- Added mapHas entailment connecting Map f r .! ltor .! l.
- Changed Forall2toBiForall.- Added BiConstrainttype class for use withBiForall.
 
- Added 
- Added Aptype family that functions asapover rows using zipping.- Added mapFto map a function over a record with anAprow.
 
- Added 
- Added toDynamicMapandfromDynamicMapas functions to convert betweenRecs andHashMap Text Dynamics.
- Added toNativeExactto convert aRecto a native Haskell type without losing any fields.
- Added toNative,fromNative, andfromNativeExactforVars.
- Added unSingletonforVars.- Removed unSingletonfromData.Rowexport list.
 
- Removed 
- Tightened the type signatures of focus(for bothRecandVar) to improve type inference when usingfocusin lens-like situations.
0.2.3.1 [2018-07-11]
- Fix a bug in the Showinstance forRec.
0.2.3.0 [2018-07-02]
- Update the Showinstance forRecto render valid code.
- Add toNativeandfromNativefunctions for records to easily convert between Haskell records and row-types records.
- Make type families in Data.Row.Internalpolykinded (Thanks James Yu!)
0.2.1.0 [2018-03-20]
- Bug Fix: The type of updatefor bothRecandVarnow enforce the newly inserted type is correct.
- New: Add restrictandsplitforVars.- Removed restrictfromData.Rowexport list.
 
- Removed 
- New: Added support for universally quantified rows: mapForallanduniqueMap.
- Added very simple test suite.
0.2.0.0 [2018-02-12]
- Initial Release
