diff options
author | Adam Gundry <adam@well-typed.com> | 2014-10-18 17:29:12 +0100 |
---|---|---|
committer | Adam Gundry <adam@well-typed.com> | 2014-10-21 09:58:59 +0100 |
commit | c975175efcf733062c2e3fb1821dbf72f466b031 (patch) | |
tree | c5b1a1e777c856d04d7a706f82cda53fd351ef4e /compiler/basicTypes/Id.lhs | |
parent | 1942fd6a8414d5664f3c9f6d1e6e39ca5265ef21 (diff) | |
download | haskell-c975175efcf733062c2e3fb1821dbf72f466b031.tar.gz |
ghc: implement OverloadedRecordFieldswip/orf-new
This fully implements the new ORF extension, developed during the Google
Summer of Code 2013, and as described on the wiki:
https://ghc.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields
This also updates the Haddock submodule.
Diffstat (limited to 'compiler/basicTypes/Id.lhs')
-rw-r--r-- | compiler/basicTypes/Id.lhs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/basicTypes/Id.lhs b/compiler/basicTypes/Id.lhs index 85e9b3083a..0fcb356552 100644 --- a/compiler/basicTypes/Id.lhs +++ b/compiler/basicTypes/Id.lhs @@ -38,7 +38,7 @@ module Id ( -- ** Taking an Id apart idName, idType, idUnique, idInfo, idDetails, idRepArity, - recordSelectorFieldLabel, + recordSelectorTyCon, -- ** Modifying an Id setIdName, setIdUnique, Id.setIdType, @@ -350,12 +350,12 @@ That is what is happening in, say tidy_insts in TidyPgm. %************************************************************************ \begin{code} --- | If the 'Id' is that for a record selector, extract the 'sel_tycon' and label. Panic otherwise -recordSelectorFieldLabel :: Id -> (TyCon, FieldLabel) -recordSelectorFieldLabel id +-- | If the 'Id' is that for a record selector, extract the 'sel_tycon'. Panic otherwise. +recordSelectorTyCon :: Id -> TyCon +recordSelectorTyCon id = case Var.idDetails id of - RecSelId { sel_tycon = tycon } -> (tycon, idName id) - _ -> panic "recordSelectorFieldLabel" + RecSelId { sel_tycon = tycon } -> tycon + _ -> panic "recordSelectorTyCon" isRecordSelector :: Id -> Bool isNaughtyRecordSelector :: Id -> Bool |