Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
34c2b025
Commit
34c2b025
authored
Oct 21, 2003
by
simonpj
Browse files
[project @ 2003-10-21 13:14:12 by simonpj]
Wibbles
parent
1bade0c9
Changes
1
Show whitespace changes
Inline
Side-by-side
ghc/compiler/typecheck/Inst.lhs
View file @
34c2b025
...
...
@@ -563,11 +563,14 @@ checkNewInst dflags ies dfun
Nothing -> return ()
-- Check for duplicate instance decls
; mappM_ (dupInstErr dfun) dup_dfuns }
; case dup_dfuns of
dup_dfun : _ -> dupInstErr dfun dup_dfun
[] -> return ()
}
where
(tvs, _, cls, tys) = tcSplitDFunTy (idType dfun)
(matches, _) = lookupInstEnv dflags ies cls tys
dup_dfuns = [dfun | (_, (_, dup_tys, dup_dfun)) <- matches,
dup_dfuns = [
dup_
dfun | (_, (_, dup_tys, dup_dfun)) <- matches,
isJust (matchTys (mkVarSet tvs) tys dup_tys)]
-- Find memebers of the match list which
-- dfun itself matches. If the match is 2-way, it's a duplicate
...
...
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