record-hasfield

A version of GHC.Records as available in future GHCs.

https://github.com/ndmitchell/record-hasfield#readme

Version on this page:1.0
LTS Haskell 22.37:1.0.1
Stackage Nightly 2024-10-11:1.0.1
Latest on Hackage:1.0.1

See all snapshots record-hasfield appears in

BSD-3-Clause licensed and maintained by Neil Mitchell
This version can be pinned in stack with:record-hasfield-1.0@sha256:c7f39b8d3f9299c7361e115e97f3474274b3487233cb155c58eb0bec7625afcb,1477

Module documentation for 1.0

Depends on 1 package(full list with versions):

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.

Changes

Changelog for record-hasfield

1.0, released 2019-03-21
Initial version