summaryrefslogtreecommitdiff
path: root/compiler/rename
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-08-28 13:09:26 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2015-08-28 17:36:34 +0200
commit75cf1ef06c1c7b47bd543d3acab003938b51ae5c (patch)
tree616975c67594bfb1c05bb68b568da1948f775ecd /compiler/rename
parent15c63d2ac1983a72de20ec83b7263bf12b79ae49 (diff)
downloadhaskell-wip/T10803.tar.gz
First part of implementing TypeSignatureSectionswip/T10803
See #10803
Diffstat (limited to 'compiler/rename')
-rw-r--r--compiler/rename/RnExpr.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rename/RnExpr.hs b/compiler/rename/RnExpr.hs
index da0d38754d..85ef82d049 100644
--- a/compiler/rename/RnExpr.hs
+++ b/compiler/rename/RnExpr.hs
@@ -176,6 +176,10 @@ rnExpr (HsPar (L loc (section@(SectionR {}))))
= do { (section', fvs) <- rnSection section
; return (HsPar (L loc section'), fvs) }
+rnExpr (HsPar (L loc (section@(TySigSection {}))))
+ = do { (section', fvs) <- rnSection section
+ ; return (HsPar (L loc section'), fvs) }
+
rnExpr (HsPar e)
= do { (e', fvs_e) <- rnLExpr e
; return (HsPar e', fvs_e) }
@@ -184,6 +188,9 @@ rnExpr expr@(SectionL {})
= do { addErr (sectionErr expr); rnSection expr }
rnExpr expr@(SectionR {})
= do { addErr (sectionErr expr); rnSection expr }
+rnExpr expr@(TySigSection {})
+ = do { addErr (sectionErr expr); rnSection expr }
+
---------------------------------------------
rnExpr (HsCoreAnn src ann expr)
@@ -400,6 +407,10 @@ rnSection section@(SectionL expr op)
; checkSectionPrec InfixL section op' expr'
; return (SectionL expr' op', fvs_op `plusFV` fvs_expr) }
+rnSection (TySigSection pty PlaceHolder)
+ = do { (pty', fvTy, wcs) <- rnLHsTypeWithWildCards ExprWithTySigCtx pty
+ ; return (TySigSection pty' wcs, fvTy) }
+
rnSection other = pprPanic "rnSection" (ppr other)
{-