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
Alex D
GHC
Commits
c4b993f3
Commit
c4b993f3
authored
Sep 04, 2007
by
TomSchrijvers
Browse files
bug fix in Decomp step of completion algorithm for given equations
parent
66c58d1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/typecheck/TcTyFuns.lhs
View file @
c4b993f3
...
...
@@ -576,7 +576,7 @@ decompInst i@(EqInst {})
do { cotvs <- zipWithM (\t1 t2 ->
newMetaTyVar TauTv
(mkCoKind t1 t2))
tys1
'
tys2
'
tys1 tys2
; let cos = map TyVarTy cotvs
; writeMetaTyVar old_covar (TyConApp con1 cos)
; return $ map mkWantedCo cotvs
...
...
@@ -584,9 +584,10 @@ decompInst i@(EqInst {})
-- co_i := Con_i old_co
(\old_co -> return $
map mkGivenCo $
mkRightCoercions (length tys1') old_co)
; insts <- zipWithM mkEqInst (zipWith EqPred tys1' tys2') cos
; return (insts, not $ null insts)
mkRightCoercions (length tys1) old_co)
; insts <- zipWithM mkEqInst (zipWith EqPred tys1 tys2) cos
; traceTc (text "decomp identicalHead" <+> ppr insts)
; return (insts, not $ null insts)
}
| con1 /= con2 && not (isOpenSynTyCon con1 || isOpenSynTyCon con2)
-- not matching data constructors (of any flavour) are bad news
...
...
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