HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Moduleghc-internal-10.0.0Haskell2010

GHC.Internal.Records

This module defines the HasField class used by the OverloadedRecordDot extension. See the <https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/hasfield.html user's guide> for more details.

  • 1 class
classclass HasField (x :: k) (r :: TYPE r_rep) (a :: TYPE a_rep) | x r -> a where
#

Constraint representing the fact that the field x belongs to the record type r and has field type a. This will be solved automatically, but manual instances may be provided as well.

Methods

  • getField :: r -> a

    Selector function to extract the field from the record.