HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulebase-4.20.2.0Haskell2010

GHC.Records

This module defines the HasField class used by the OverloadedRecordFields extension. See the <https://gitlab.haskell.org/ghc/ghc/wikis/records/overloaded-record-fields wiki page> for more details.

  • 1 class
  • Packagebase-4.20.2.0
  • Exports1
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceRecords.hs
classclass HasField (x :: k) r a | 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.