summaryrefslogtreecommitdiff
path: root/compiler/parser/Parser.y.pp
diff options
context:
space:
mode:
authorAdam Gundry <adam@well-typed.com>2014-10-18 17:29:12 +0100
committerAdam Gundry <adam@well-typed.com>2014-10-21 09:58:59 +0100
commitc975175efcf733062c2e3fb1821dbf72f466b031 (patch)
treec5b1a1e777c856d04d7a706f82cda53fd351ef4e /compiler/parser/Parser.y.pp
parent1942fd6a8414d5664f3c9f6d1e6e39ca5265ef21 (diff)
downloadhaskell-wip/orf-new.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/parser/Parser.y.pp')
-rw-r--r--compiler/parser/Parser.y.pp6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp
index e33808daac..468e456c5f 100644
--- a/compiler/parser/Parser.y.pp
+++ b/compiler/parser/Parser.y.pp
@@ -1380,7 +1380,7 @@ fielddecls1 :: { [ConDeclField RdrName] }
| fielddecl { $1 }
fielddecl :: { [ConDeclField RdrName] } -- A list because of f,g :: Int
- : maybe_docnext sig_vars '::' ctype maybe_docprev { [ ConDeclField fld $4 ($1 `mplus` $5)
+ : maybe_docnext sig_vars '::' ctype maybe_docprev { [ ConDeclField fld (error "cd_fld_sel not set") $4 ($1 `mplus` $5)
| fld <- reverse (unLoc $2) ] }
-- We allow the odd-looking 'inst_type' in a deriving clause, so that
@@ -1934,12 +1934,12 @@ fbinds1 :: { ([HsRecField RdrName (LHsExpr RdrName)], Bool) }
| '..' { ([], True) }
fbind :: { HsRecField RdrName (LHsExpr RdrName) }
- : qvar '=' texp { HsRecField $1 $3 False }
+ : qvar '=' texp { HsRecField $1 hsRecFieldSelMissing $3 False }
-- RHS is a 'texp', allowing view patterns (Trac #6038)
-- and, incidentaly, sections. Eg
-- f (R { x = show -> s }) = ...
- | qvar { HsRecField $1 placeHolderPunRhs True }
+ | qvar { HsRecField $1 hsRecFieldSelMissing placeHolderPunRhs True }
-- In the punning case, use a place-holder
-- The renamer fills in the final value