@hackage record-hasfield1.0.1
A version of GHC.Records as available in future GHCs.
Categories
License
BSD-3-Clause
Maintainer
Neil Mitchell <ndmitchell@gmail.com>
Links
Versions
Installation
Dependencies (1)
Dependents (13)
@hackage/sdl3-bindgen-sys, @hackage/large-anon, @hackage/overloaded, @hackage/grapesy, @hackage/proto3-suite, @hackage/mit-3qvpPyAi6mH, Show all…
record-hasfield

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.