Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
5c65388b
Commit
5c65388b
authored
Jun 08, 2012
by
dimitris
Browse files
Removing stale and commented out code.
parent
52d9f09b
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/typecheck/TcCanonical.lhs
View file @
5c65388b
...
...
@@ -663,31 +663,6 @@ flatten d _f ctxt ty@(ForAllTy {})
= do { let (tvs, rho) = splitForAllTys ty
; (rho', co) <- flatten d FMSubstOnly ctxt rho
; return (mkForAllTys tvs rho', foldr mkTcForAllCo co tvs) }
{- DELETEME
; when (under_families tvs rho) $ wrapErrTcS $ flattenForAllErrorTcS ctxt ty
; (rho', co) <- flatten d FMSubstOnly ctxt rho
-- Only do substitutions, not flattening under ForAlls
; return (mkForAllTys tvs rho', foldr mkTcForAllCo co tvs) }
-- DV: Simon and I have a better plan here related to #T5934 and that plan is to
-- first normalize completely the rho type with respect to the top-level instances,
-- and then flatten out only the family equations that do not mention the quantified
-- variable. Keep the rest as they are. There is no worry that we don't normalize with
-- the givens because the givens can't possibly mention the quantified variable anyway!
where under_families tvs rho
= go (mkVarSet tvs) rho
where go _bound (TyVarTy _tv) = False
go _ (LitTy {}) = False
go bound (TyConApp tc tys)
| isSynFamilyTyCon tc
, (args,rest) <- splitAt (tyConArity tc) tys
= (tyVarsOfTypes args `intersectsVarSet` bound) || any (go bound) rest
| otherwise = any (go bound) tys
go bound (FunTy arg res) = go bound arg || go bound res
go bound (AppTy fun arg) = go bound fun || go bound arg
go bound (ForAllTy tv ty) = go (bound `extendVarSet` tv) ty
-}
\end{code}
...
...
Write
Preview
Supports
Markdown
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