Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
This module provides a version of GHC.Records as it will be after the implementation of GHC proposal #42.
In future GHC versions it will be an alias for GHC.Records.
Documentation
class HasField x r a | x r -> a where Source #
Constraint representing the fact that the field x
can be get and set on
the record type r
and has field type a
. This constraint will be solved
automatically, but manual instances may be provided as well.
The function should satisfy the invariant:
uncurry ($) (hasField @x r) == r
Instances
HasField () a a Source # | |
Defined in GHC.Records.Extra | |
HasField "_1" (a, b) a Source # | |
Defined in GHC.Records.Extra | |
HasField "_2" (a, b) b Source # | |
Defined in GHC.Records.Extra | |
HasField "_1" (a, b, c) a Source # | |
Defined in GHC.Records.Extra | |
HasField "_2" (a, b, c) b Source # | |
Defined in GHC.Records.Extra | |
HasField "_3" (a, b, c) c Source # | |
Defined in GHC.Records.Extra | |
HasField "_1" (a, b, c, d) a Source # | |
Defined in GHC.Records.Extra | |
HasField "_2" (a, b, c, d) b Source # | |
Defined in GHC.Records.Extra | |
HasField "_3" (a, b, c, d) c Source # | |
Defined in GHC.Records.Extra | |
HasField "_4" (a, b, c, d) d Source # | |
Defined in GHC.Records.Extra | |
HasField "_1" (a, b, c, d, e) a Source # | |
Defined in GHC.Records.Extra | |
HasField "_2" (a, b, c, d, e) b Source # | |
Defined in GHC.Records.Extra | |
HasField "_3" (a, b, c, d, e) c Source # | |
Defined in GHC.Records.Extra | |
HasField "_4" (a, b, c, d, e) d Source # | |
Defined in GHC.Records.Extra | |
HasField "_5" (a, b, c, d, e) e Source # | |
Defined in GHC.Records.Extra | |
(a1 ~ r2, HasField x1 r1 a1, HasField x2 r2 a2) => HasField ((,) x1 x2 :: (k2, k1)) r1 a2 Source # | |
Defined in GHC.Records.Extra | |
(a1 ~ r2, a2 ~ r3, HasField x1 r1 a1, HasField x2 r2 a2, HasField x3 r3 a3) => HasField ((,,) x1 x2 x3 :: (k3, k2, k1)) r1 a3 Source # | |
Defined in GHC.Records.Extra | |
(a1 ~ r2, a2 ~ r3, a3 ~ r4, HasField x1 r1 a1, HasField x2 r2 a2, HasField x3 r3 a3, HasField x4 r4 a4) => HasField ((,,,) x1 x2 x3 x4 :: (k4, k3, k2, k1)) r1 a4 Source # | |
Defined in GHC.Records.Extra | |
(a1 ~ r2, a2 ~ r3, a3 ~ r4, a4 ~ r5, HasField x1 r1 a1, HasField x2 r2 a2, HasField x3 r3 a3, HasField x4 r4 a4, HasField x5 r5 a5) => HasField ((,,,,) x1 x2 x3 x4 x5 :: (k5, k4, k3, k2, k1)) r1 a5 Source # | |
Defined in GHC.Records.Extra |