diff options
author | Richard Eisenberg <eir@cis.upenn.edu> | 2016-03-19 16:55:50 -0400 |
---|---|---|
committer | Richard Eisenberg <eir@cis.upenn.edu> | 2016-03-21 12:16:12 -0400 |
commit | 35e937973f61a7e5534ecd0b1c67111cd82d4238 (patch) | |
tree | 515dd4f04763c179dad1ae1ed29ed4e5b3459bc8 /compiler/vectorise | |
parent | 947709395015bd6122eedc6da5df356660e76208 (diff) | |
download | haskell-35e937973f61a7e5534ecd0b1c67111cd82d4238.tar.gz |
Track specified/invisible more carefully.
In particular, this allows correct tracking of specified/invisible
for variables in Haskell98 data constructors and in pattern synonyms.
GADT-syntax constructors are harder, and are left until #11721.
This was all inspired by Simon's comments to my fix for #11512,
which this subsumes.
Test case: ghci/scripts/TypeAppData
[skip ci] (The test case fails because of an unrelated problem
fixed in the next commit.)
Diffstat (limited to 'compiler/vectorise')
-rw-r--r-- | compiler/vectorise/Vectorise/Generic/PData.hs | 8 | ||||
-rw-r--r-- | compiler/vectorise/Vectorise/Type/TyConDecl.hs | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/compiler/vectorise/Vectorise/Generic/PData.hs b/compiler/vectorise/Vectorise/Generic/PData.hs index 4f3112850d..54f5ace6e6 100644 --- a/compiler/vectorise/Vectorise/Generic/PData.hs +++ b/compiler/vectorise/Vectorise/Generic/PData.hs @@ -85,8 +85,8 @@ buildPDataDataCon orig_name vect_tc repr_tc repr (map (const no_bang) comp_tys) (Just $ map (const HsLazy) comp_tys) [] -- no field labels - tvs - [] -- no existentials + tvs (mkNamedBinders Specified tvs) + [] [] -- no existentials [] -- no eq spec [] -- no context comp_tys @@ -129,8 +129,8 @@ buildPDatasDataCon orig_name vect_tc repr_tc repr (map (const no_bang) comp_tys) (Just $ map (const HsLazy) comp_tys) [] -- no field labels - tvs - [] -- no existentials + tvs (mkNamedBinders Specified tvs) + [] [] -- no existentials [] -- no eq spec [] -- no context comp_tys diff --git a/compiler/vectorise/Vectorise/Type/TyConDecl.hs b/compiler/vectorise/Vectorise/Type/TyConDecl.hs index 4847aa87f1..4bf6515826 100644 --- a/compiler/vectorise/Vectorise/Type/TyConDecl.hs +++ b/compiler/vectorise/Vectorise/Type/TyConDecl.hs @@ -191,8 +191,8 @@ vectDataCon dc (dataConSrcBangs dc) -- strictness as original constructor (Just $ dataConImplBangs dc) [] -- no labelled fields for now - univ_tvs -- universally quantified vars - [] -- no existential tvs for now + univ_tvs univ_bndrs -- universally quantified vars + [] [] -- no existential tvs for now [] -- no equalities for now [] -- no context for now arg_tys -- argument types @@ -204,3 +204,4 @@ vectDataCon dc rep_arg_tys = dataConRepArgTys dc tycon = dataConTyCon dc (univ_tvs, ex_tvs, eq_spec, theta, _arg_tys, _res_ty) = dataConFullSig dc + univ_bndrs = dataConUnivTyBinders dc |