record-hasfield: A version of GHC.Records as available in future GHCs.

[ bsd3, development, library ] [ Propose Tags ]

This package provides a version of GHC.Records as it will be after the implementation of GHC proposal #42, plus some helper functions over it.


[Skip to Readme]
Versions [faq] 1.0
Change log CHANGES.txt
Dependencies base (>=4.4 && <5) [details]
License BSD-3-Clause
Copyright Adam Gundry and Neil Mitchell 2018-2019
Author Neil Mitchell <ndmitchell@gmail.com>
Maintainer Neil Mitchell <ndmitchell@gmail.com>
Category Development
Home page https://github.com/ndmitchell/record-hasfield#readme
Bug tracker https://github.com/ndmitchell/record-hasfield/issues
Source repo head: git clone https://github.com/ndmitchell/record-hasfield.git
Uploaded by NeilMitchell at Thu Mar 21 13:47:58 UTC 2019
Distributions NixOS:1.0, Stackage:1.0
Downloads 63 total (12 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2019-03-21 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for record-hasfield-1.0

[back to package description]

record-hasfield Hackage version Stackage version Build status

This package provides a version of "GHC.Records" as it will be after the implementation of GHC proposal #42, which reads:

-- | Constraint representing the fact that the field @x@ can be get and set on
--   the record type @r@ and has field type @a@.
class HasField x r a | x r -> a where
    -- | Function to get and set a field in a record.
    hasField :: r -> (a -> r, a)

In GHC these will be magically solved, but this package doesn't provide that. This package does provide extra helper functions for working with the HasField type class.