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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
alexbiehl-gc
GHC
Commits
be97d35b
Commit
be97d35b
authored
25 years ago
by
Simon Peyton Jones
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1999-05-26 16:54:22 by simonpj]
Minor improvements in error messages
parent
451a8613
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ghc/compiler/rename/RnSource.lhs
+1
-2
1 addition, 2 deletions
ghc/compiler/rename/RnSource.lhs
ghc/compiler/typecheck/TcExpr.lhs
+2
-1
2 additions, 1 deletion
ghc/compiler/typecheck/TcExpr.lhs
ghc/compiler/types/PprType.lhs
+5
-2
5 additions, 2 deletions
ghc/compiler/types/PprType.lhs
with
8 additions
and
5 deletions
ghc/compiler/rename/RnSource.lhs
+
1
−
2
View file @
be97d35b
...
...
@@ -886,8 +886,7 @@ forAllErr doc ty tyvar
(ptext SLIT("In") <+> doc))
ctxtErr explicit_forall doc tyvars constraint ty
= sep [ptext SLIT("None of the type variable(s) in the constraint") <+> quotes (pprClassAssertion constraint) <+>
ptext SLIT("does not mention any of"),
= sep [ptext SLIT("None of the type variable(s) in the constraint") <+> quotes (pprClassAssertion constraint),
if explicit_forall then
nest 4 (ptext SLIT("is universally quantified (i.e. bound by the forall)"))
else
...
...
This diff is collapsed.
Click to expand it.
ghc/compiler/typecheck/TcExpr.lhs
+
2
−
1
View file @
be97d35b
...
...
@@ -159,7 +159,8 @@ tcPolyExpr arg expected_arg_ty
returnTc ( generalised_arg, free_insts,
arg', sig_tau, lie_arg )
where
sig_msg ty = ptext SLIT("In an expression with expected type:") <+> ppr ty
sig_msg ty = sep [ptext SLIT("In an expression with expected type:"),
nest 4 (ppr ty)]
\end{code}
%************************************************************************
...
...
This diff is collapsed.
Click to expand it.
ghc/compiler/types/PprType.lhs
+
5
−
2
View file @
be97d35b
...
...
@@ -170,7 +170,7 @@ ppr_ty env ctxt_prec ty@(ForAllTy _ _)
-- The type checker occasionally prints a type in an error message,
-- and it had better come out looking like a user type
sep [ ptext SLIT("forall") <+> pp_tyvars <> ptext SLIT("."),
ppr_theta theta
<+> ptext SLIT("=>")
,
ppr_theta theta,
ppr_ty env tOP_PREC tau
]
where
...
...
@@ -179,7 +179,10 @@ ppr_ty env ctxt_prec ty@(ForAllTy _ _)
pp_tyvars = hsep (map (pBndr env LambdaBind) tyvars)
ppr_theta theta = parens (hsep (punctuate comma (map ppr_dict theta)))
ppr_theta [] = empty
ppr_theta theta = parens (hsep (punctuate comma (map ppr_dict theta)))
<+> ptext SLIT("=>")
ppr_dict (clas,tys) = ppr clas <+> hsep (map (ppr_ty env tYCON_PREC) tys)
...
...
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