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
bd0ff2bb
Commit
bd0ff2bb
authored
24 years ago
by
Simon Peyton Jones
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 2000-07-18 08:08:35 by simonpj]
Remove dead code: checkConstraints and univErr
parent
5f0c89e0
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/rename/RnSource.lhs
+0
-29
0 additions, 29 deletions
ghc/compiler/rename/RnSource.lhs
with
0 additions
and
29 deletions
ghc/compiler/rename/RnSource.lhs
+
0
−
29
View file @
bd0ff2bb
...
...
@@ -656,26 +656,6 @@ rnHsTupConWkr (HsTupCon n boxity)
\end{code}
\begin{code}
-- Check that each constraint mentions at least one of the forall'd type variables
-- Since the forall'd type variables are a subset of the free tyvars
-- of the tau-type part, this guarantees that every constraint mentions
-- at least one of the free tyvars in ty
checkConstraints doc forall_tyvars tau_vars ctxt ty
= mapRn (checkPred doc forall_tyvars ty) ctxt `thenRn` \ maybe_ctxt' ->
returnRn (catMaybes maybe_ctxt')
-- Remove problem ones, to avoid duplicate error message.
checkPred doc forall_tyvars ty p@(HsPClass clas tys)
| not_univ = failWithRn Nothing (univErr doc p ty)
| otherwise = returnRn (Just p)
where
ct_vars = extractHsTysRdrTyVars tys
not_univ = -- At least one of the tyvars in each constraint must
-- be universally quantified. This restriction isn't in Hugs
not (any (`elem` forall_tyvars) ct_vars)
checkPred doc forall_tyvars ty p@(HsPIParam _ _)
= returnRn (Just p)
rnForAll doc forall_tyvars ctxt ty
= bindTyVarsFVRn doc forall_tyvars $ \ new_tyvars ->
rnContext doc ctxt `thenRn` \ (new_ctxt, cxt_fvs) ->
...
...
@@ -952,15 +932,6 @@ forAllErr doc ty tyvar
$$
(ptext SLIT("In") <+> doc))
univErr doc constraint ty
= sep [ptext SLIT("All of the type variable(s) in the constraint")
<+> quotes (ppr constraint)
<+> ptext SLIT("are already in scope"),
nest 4 (ptext SLIT("At least one must be universally quantified here"))
]
$$
(ptext SLIT("In") <+> doc)
badRuleLhsErr name lhs
= sep [ptext SLIT("Rule") <+> ptext name <> colon,
nest 4 (ptext SLIT("Illegal left-hand side:") <+> ppr lhs)]
...
...
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