Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Alex D
GHC
Commits
6c563780
Commit
6c563780
authored
Sep 15, 2010
by
simonpj@microsoft.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix egregious bug in deeplyInstantiate
This resulted in an infinite loop in applyTypeToArgs, in syb
parent
7998a244
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
compiler/typecheck/Inst.lhs
compiler/typecheck/Inst.lhs
+6
-6
No files found.
compiler/typecheck/Inst.lhs
View file @
6c563780
...
...
@@ -143,7 +143,7 @@ deeplySkolemise
deeplySkolemise skol_info ty
| Just (arg_tys, tvs, theta, ty') <- tcDeepSplitSigmaTy_maybe ty
= do { ids1 <- newSysLocalIds (fsLit "d
s
k") arg_tys
= do { ids1 <- newSysLocalIds (fsLit "dk") arg_tys
; tvs1 <- mapM (tcInstSkolTyVar skol_info) tvs
; let subst = zipTopTvSubst tvs (mkTyVarTys tvs1)
; ev_vars1 <- newEvVars (substTheta subst theta)
...
...
@@ -170,14 +170,14 @@ deeplyInstantiate :: CtOrigin -> TcSigmaType -> TcM (HsWrapper, TcRhoType)
deeplyInstantiate orig ty
| Just (arg_tys, tvs, theta, rho) <- tcDeepSplitSigmaTy_maybe ty
= do { (_, tys, subst) <- tcInstTyVars tvs
; ids1 <- newSysLocalIds (fsLit "d
sk
") (substTys subst arg_tys)
; ids1 <- newSysLocalIds (fsLit "d
i
") (substTys subst arg_tys)
; wrap1 <- instCall orig tys (substTheta subst theta)
; (wrap2, rho) <- deeplyInstantiate orig (substTy subst rho)
; (wrap2, rho
2
) <- deeplyInstantiate orig (substTy subst rho)
; return (mkWpLams ids1
<.> wrap2
<.> wrap1
<.> mkWpEvVarApps ids1
<.> wrap2,
mkFunTys arg_tys rho) }
<.> mkWpEvVarApps ids1,
mkFunTys arg_tys rho2) }
| otherwise = return (idHsWrapper, ty)
\end{code}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment