Visib isible Dep e Depen ende dent nt Quan uantifjcati tifjcation
- n (V
(VDQ) Q)
Ryan Scott
PL Wonks March 8, 2019
Visib isible Dep e Depen ende dent nt Quan uantifjcati - - PowerPoint PPT Presentation
Visib isible Dep e Depen ende dent nt Quan uantifjcati tifjcation on (V (VDQ) Q) Ryan Scott PL Wonks March 8, 2019 Code t Code time! me! The VDQ p he VDQ pat atch ch --- a/compiler/parser/Parser.y +++
Ryan Scott
PL Wonks March 8, 2019
+++ b/compiler/parser/Parser.y +forall_vis_flag :: { ForallVisFlag } + : '.' { ForallInvis } + | '->' { ForallVis } +
ctype :: { LHsType GhcPs }
+ : 'forall' tv_bndrs forall_vis_flag ctype {% ...
+ HsForAllTy { hst_fvf = $3 + , hst_bndrs = $2
+++ b/compiler/typecheck/TcHsType.hs
+tc_hs_type forall@(HsForAllTy { hst_fvf = fvf, ... }) = do { ...
+ ; let argf = case fvf of + ForallVis -> Required + ForallInvis -> Specified + bndrs = mkTyVarBinders argf tvs'
vdqAllowed :: UserTypeCtxt -> Bool
vdqAllowed :: UserTypeCtxt -> Bool
vdqAllowed (KindSigCtxt {}) = True vdqAllowed (TySynCtxt {}) = True
vdqAllowed :: UserTypeCtxt -> Bool
vdqAllowed (KindSigCtxt {}) = True vdqAllowed (TySynCtxt {}) = True
vdqAllowed (FunSigCtxt {}) = False vdqAllowed (InstDeclCtxt {}) = False