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
84d9ef0f
Commit
84d9ef0f
authored
Oct 29, 2014
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor refactoring (no change in functionality)
parent
f054822c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
compiler/typecheck/TcErrors.lhs
compiler/typecheck/TcErrors.lhs
+3
-3
No files found.
compiler/typecheck/TcErrors.lhs
View file @
84d9ef0f
...
...
@@ -989,7 +989,9 @@ mkDictErr ctxt cts
= ASSERT( not (null cts) )
do { inst_envs <- tcGetInstEnvs
; fam_envs <- tcGetFamInstEnvs
; lookups <- mapM (lookup_cls_inst inst_envs) cts
; let (ct1:_) = cts -- ct1 just for its location
min_cts = elim_superclasses cts
; lookups <- mapM (lookup_cls_inst inst_envs) min_cts
; let (no_inst_cts, overlap_cts) = partition is_no_inst lookups
-- Report definite no-instance errors,
...
...
@@ -1000,8 +1002,6 @@ mkDictErr ctxt cts
; (ctxt, err) <- mk_dict_err fam_envs ctxt (head (no_inst_cts ++ overlap_cts))
; mkErrorMsg ctxt ct1 err }
where
ct1:_ = elim_superclasses cts
no_givens = null (getUserGivens ctxt)
is_no_inst (ct, (matches, unifiers, _))
...
...
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