base-4.15.0.0: Basic libraries
Copyright(c) Adam Gundry 2015-2016
Licensesee libraries/base/LICENSE
Maintainercvs-ghc@haskell.org
Stabilityinternal
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Records

Description

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.

Synopsis

Documentation

class HasField x r a | 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.