ghc-internal-9.1100.0: Basic libraries
Copyright(c) Adam Gundry 2015-2024
Licensesee libraries/base/LICENSE
Maintainerghc-devs@haskell.org
Stabilityinternal
Portabilitynon-portable (GHC extensions)
Safe HaskellTrustworthy
LanguageHaskell2010

GHC.Internal.Records

Description

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.

Synopsis

Documentation

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

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 Source #

Selector function to extract the field from the record.