Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Fix #1015 with dataConUserTyVars #1022

Merged
merged 1 commit into from
Feb 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions haddock-api/src/Haddock/Convert.hs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ synifyDataCon use_gadt_syntax dc =
use_named_field_syntax = not (null field_tys)
name = synifyName dc
-- con_qvars means a different thing depending on gadt-syntax
(univ_tvs, ex_tvs, _eq_spec, theta, arg_tys, res_ty) = dataConFullSig dc
(_univ_tvs, ex_tvs, _eq_spec, theta, arg_tys, res_ty) = dataConFullSig dc
user_tvs = dataConUserTyVars dc -- Used for GADT data constructors

-- skip any EqTheta, use 'orig'inal syntax
ctx | null theta = Nothing
Expand Down Expand Up @@ -385,8 +386,8 @@ synifyDataCon use_gadt_syntax dc =
then return $ noLoc $
ConDeclGADT { con_g_ext = noExt
, con_names = [name]
, con_forall = noLoc False
, con_qvars = synifyTyVars (univ_tvs ++ ex_tvs)
, con_forall = noLoc $ not $ null user_tvs
, con_qvars = synifyTyVars user_tvs
, con_mb_cxt = ctx
, con_args = hat
, con_res_ty = synifyType WithinType [] res_ty
Expand Down