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

[ bsd3, development, library ] [ Propose Tags ] [ Report a vulnerability ]

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]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0, 1.0.1
Change log CHANGES.txt
Dependencies base (>=4.4 && <5) [details]
Tested with ghc ==9.8, ghc ==9.6, ghc ==9.4, ghc ==9.2, ghc ==9.0, ghc ==8.10, ghc ==8.8
License BSD-3-Clause
Copyright Adam Gundry and Neil Mitchell 2018-2024
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 2024-01-21T09:32:37Z
Distributions LTSHaskell:1.0.1, NixOS:1.0.1, Stackage:1.0.1
Reverse Dependencies 6 direct, 2 indirect [details]
Downloads 3976 total (70 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-01-21 [all 1 reports]

Readme for record-hasfield-1.0.1

[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.