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

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Modulebase-4.22.0.0Haskell2010

GHC.Records

This module defines the HasField class used by the OverloadedRecordDot extension. See the wiki page for more details.

  • 1 class
  • Packagebase-4.22.0.0
  • Exports1
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceRecords.hs
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.