aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Convert.hs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2017-08-22 23:02:51 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2017-08-23 14:47:29 -0400
commit815d2deb9c0222c916becccf8464b740c26255fd (patch)
treed9ad3d510fac4bdc516f51e2966ca46034650f2c /haddock-api/src/Haddock/Convert.hs
parent648410f64b4a2423f2afe8afb6089b7749ebd4af (diff)
Update for #14131
Diffstat (limited to 'haddock-api/src/Haddock/Convert.hs')
-rw-r--r--haddock-api/src/Haddock/Convert.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index 36efb3e4..67aa88e1 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -113,20 +113,20 @@ synifyAxBranch tc (CoAxBranch { cab_tvs = tkvs, cab_lhs = args, cab_rhs = rhs })
= let name = synifyName tc
typats = map (synifyType WithinType) args
hs_rhs = synifyType WithinType rhs
- in TyFamEqn { tfe_tycon = name
- , tfe_pats = HsIB { hsib_body = typats
- , hsib_vars = map tyVarName tkvs
- , hsib_closed = True }
- , tfe_fixity = Prefix
- , tfe_rhs = hs_rhs }
+ in HsIB { hsib_vars = map tyVarName tkvs
+ , hsib_closed = True
+ , hsib_body = FamEqn { feqn_tycon = name
+ , feqn_pats = typats
+ , feqn_fixity = Prefix
+ , feqn_rhs = hs_rhs } }
synifyAxiom :: CoAxiom br -> Either ErrMsg (HsDecl GhcRn)
synifyAxiom ax@(CoAxiom { co_ax_tc = tc })
| isOpenTypeFamilyTyCon tc
, Just branch <- coAxiomSingleBranch_maybe ax
- = return $ InstD (TyFamInstD
- (TyFamInstDecl { tfid_eqn = noLoc $ synifyAxBranch tc branch
- , tfid_fvs = placeHolderNamesTc }))
+ = return $ InstD
+ $ TyFamInstD
+ $ TyFamInstDecl { tfid_eqn = synifyAxBranch tc branch }
| Just ax' <- isClosedSynFamilyTyConWithAxiom_maybe tc
, getUnique ax' == getUnique ax -- without the getUniques, type error