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

Moduleghc-internal-9.1401.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.