Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
9282daea
Commit
9282daea
authored
24 years ago
by
Simon Peyton Jones
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 2000-06-30 13:10:38 by simonpj]
Improve error message
parent
dc9cf6cf
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/typecheck/TcMonoType.lhs
+3
-3
3 additions, 3 deletions
ghc/compiler/typecheck/TcMonoType.lhs
with
3 additions
and
3 deletions
ghc/compiler/typecheck/TcMonoType.lhs
+
3
−
3
View file @
9282daea
...
...
@@ -201,7 +201,7 @@ tc_type_kind (HsUsgForAllTy uv_name ty)
tc_type_kind ty `thenTc` \ (kind, tc_ty) ->
returnTc (kind, mkUsForAllTy uv tc_ty)
tc_type_kind (HsForAllTy (Just tv_names) context ty)
tc_type_kind
full_ty@
(HsForAllTy (Just tv_names) context ty)
= tcExtendTyVarScope tv_names $ \ forall_tyvars ->
tcContext context `thenTc` \ theta ->
tc_type_kind ty `thenTc` \ (kind, tau) ->
...
...
@@ -240,8 +240,8 @@ tc_type_kind (HsForAllTy (Just tv_names) context ty)
not (ct_var `elemUFM` extended_tau_vars)
is_free ct_var = not (ct_var `elem` forall_tyvars)
check_pred pred = checkTc (not any_ambig) (ambigErr pred ty) `thenTc_`
checkTc (not all_free) (freeErr pred ty)
check_pred pred = checkTc (not any_ambig) (ambigErr pred
full_
ty) `thenTc_`
checkTc (not all_free) (freeErr pred
full_
ty)
where
ct_vars = varSetElems (tyVarsOfPred pred)
any_ambig = is_source_polytype && any is_ambig ct_vars
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment