Skip to content
This repository was archived by the owner on Nov 1, 2018. It is now read-only.

Commit 57da02f

Browse files
committed
minor cosmetics edits to Ty_TBind
1 parent 1321805 commit 57da02f

File tree

2 files changed

+9
-29
lines changed

2 files changed

+9
-29
lines changed

EHC/src/ehc/Ty.cag

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,11 +1108,7 @@ tyMbVar = fmap fst . tyMbVar'
11081108
tyMbQu :: Ty -> Maybe TyQu
11091109
tyMbQu t
11101110
= case tyUnAnn t of
1111-
%%[[4
1112-
Ty_TBind q _ _
1113-
%%][6
1114-
Ty_TBind q _ _ _
1115-
%%]]
1111+
Ty_TBind {qu_Ty_TBind=q}
11161112
-> Just q
11171113
_ -> Nothing
11181114
%%]
@@ -1160,8 +1156,8 @@ tyAllConS t
11601156
tyQuant :: Ty -> Ty
11611157
tyQuant t
11621158
= case tyUnAnn t of
1163-
Ty_TBind _ _ _ t' -> tyQuant t'
1164-
_ -> t
1159+
Ty_TBind {ty_Ty_TBind=t'} -> tyQuant t'
1160+
_ -> t
11651161
%%]
11661162

11671163
Substitution aware variants
@@ -1226,8 +1222,8 @@ mkTyRecExt recd al
12261222
tyVarChkVisitLift :: LookupTy -> (Ty -> x) -> (Ty -> x) -> Ty -> x
12271223
tyVarChkVisitLift
12281224
= withLkupChkVisitLift tyMbVar (noVisit . tyUnAnn)
1229-
where noVisit (Ty_TBind _ qv _ _) = Set.singleton qv
1230-
noVisit _ = Set.empty
1225+
where noVisit (Ty_TBind {tv_Ty_TBind=qv}) = Set.singleton qv
1226+
noVisit _ = Set.empty
12311227

12321228
tyVarLift :: LookupTy -> (Ty -> x) -> (Ty -> x) -> Ty -> x
12331229
tyVarLift = withLkupLift tyMbVar

EHC/src/ehc/Ty/FitsIn.chs

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,33 +1189,21 @@ GADT: when encountering a product with eq-constraints on the outset, remove them
11891189
%%]
11901190

11911191
%%[(4 hmtyinfer).fitsIn.QLR
1192-
%%[[4
1193-
fBase fi updTy t1@(Ty_TBind q1 _ _) t2@(Ty_TBind q2 _ _)
1194-
%%][6
1195-
fBase fi updTy t1@(Ty_TBind q1 _ _ _) t2@(Ty_TBind q2 _ _ _)
1196-
%%]]
1192+
fBase fi updTy t1@(Ty_TBind {qu_Ty_TBind=q1}) t2@(Ty_TBind {qu_Ty_TBind=q2})
11971193
| fioMode (fiFIOpts fi) == FitUnify && q1 == q2
11981194
= fVar' fTySyn fi2 id uqt1 uqt2
11991195
where (fi1,uqt1,_,_) = unquant fi t1 False instCoConst
12001196
(fi2,uqt2,_,_) = unquant fi1 t2 False instCoConst
12011197
%%]
12021198

12031199
%%[(4 hmtyinfer).fitsIn.QR
1204-
%%[[4
1205-
fBase fi updTy t1 t2@(Ty_TBind _ _ _)
1206-
%%][6
1207-
fBase fi updTy t1 t2@(Ty_TBind _ _ _ _)
1208-
%%]]
1200+
fBase fi updTy t1 t2@(Ty_TBind {})
12091201
| fioIsSubsume (fiFIOpts fi) && fioLeaveRInst (fiFIOpts fi)
12101202
= back2 (fo { foRInstToL = instto2 ++ foRInstToL fo
12111203
})
12121204
where (fi2,uqt2,back2,instto2) = unquant fi t2 False instCoConst
12131205
fo = fVar' fTySyn fi2 id t1 uqt2
1214-
%%[[4
1215-
fBase fi updTy t1 t2@(Ty_TBind _ _ _)
1216-
%%][6
1217-
fBase fi updTy t1 t2@(Ty_TBind _ _ _ _)
1218-
%%]]
1206+
fBase fi updTy t1 t2@(Ty_TBind {})
12191207
| fioIsSubsume (fiFIOpts fi) && not (fioLeaveRInst (fiFIOpts fi))
12201208
= back2 (fo { foRInstToL = instto2 ++ foRInstToL fo
12211209
})
@@ -1224,11 +1212,7 @@ GADT: when encountering a product with eq-constraints on the outset, remove them
12241212
%%]
12251213

12261214
%%[(4 hmtyinfer).fitsIn.QL
1227-
%%[[4
1228-
fBase fi updTy t1@(Ty_TBind _ _ _) t2
1229-
%%][6
1230-
fBase fi updTy t1@(Ty_TBind _ _ _ _) t2
1231-
%%]]
1215+
fBase fi updTy t1@(Ty_TBind {}) t2
12321216
| fioIsSubsume (fiFIOpts fi) = fo { foLInstToL = instto1 ++ foLInstToL fo
12331217
}
12341218
where (fi1,uqt1,back1,instto1) = unquant fi t1 False instCoConst

0 commit comments

Comments
 (0)