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
bca10d12
Commit
bca10d12
authored
25 years ago
by
Simon Peyton Jones
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1999-07-26 15:22:38 by simonpj]
Fix type in tcMatch discovered by Keith
parent
40075824
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/typecheck/TcMatches.lhs
+4
-4
4 additions, 4 deletions
ghc/compiler/typecheck/TcMatches.lhs
with
4 additions
and
4 deletions
ghc/compiler/typecheck/TcMatches.lhs
+
4
−
4
View file @
bca10d12
...
@@ -20,9 +20,9 @@ import TcHsSyn ( TcMatch, TcGRHSs, TcStmt )
...
@@ -20,9 +20,9 @@ import TcHsSyn ( TcMatch, TcGRHSs, TcStmt )
import TcMonad
import TcMonad
import TcMonoType ( checkSigTyVars, tcHsTyVar, tcHsType, sigPatCtxt )
import TcMonoType ( checkSigTyVars, tcHsTyVar, tcHsType, sigPatCtxt )
import Inst ( Inst, LIE, plusLIE, emptyLIE, plusLIEs )
import Inst ( Inst, LIE, plusLIE, emptyLIE, plusLIEs )
import TcEnv ( tcExtendLocalValEnv, tcExtendGlobalTyVars, tcExtendTyVarEnv )
import TcEnv ( tcExtendLocalValEnv, tcExtendGlobalTyVars, tcExtendTyVarEnv
, tcGetGlobalTyVars
)
import TcPat ( tcPat, tcPatBndr_NoSigs, polyPatSig )
import TcPat ( tcPat, tcPatBndr_NoSigs, polyPatSig )
import TcType ( TcType, newTyVarTy, newTyVarTy_OpenKind )
import TcType ( TcType, newTyVarTy, newTyVarTy_OpenKind
, zonkTcTyVars
)
import TcBinds ( tcBindsAndThen )
import TcBinds ( tcBindsAndThen )
import TcSimplify ( tcSimplifyAndCheck, bindInstsOfLocalFuns )
import TcSimplify ( tcSimplifyAndCheck, bindInstsOfLocalFuns )
import TcUnify ( unifyFunTy, unifyTauTy )
import TcUnify ( unifyFunTy, unifyTauTy )
...
@@ -135,7 +135,7 @@ tcMatch xve1 match@(Match sig_tvs pats maybe_rhs_sig grhss) expected_ty ctxt
...
@@ -135,7 +135,7 @@ tcMatch xve1 match@(Match sig_tvs pats maybe_rhs_sig grhss) expected_ty ctxt
returnTc match_and_lie
returnTc match_and_lie
else
else
-- If there are sig tv
e
we must be careful *not* to use
-- If there are sig tv
s
we must be careful *not* to use
-- expected_ty right away, else we'll unify with tyvars free
-- expected_ty right away, else we'll unify with tyvars free
-- in the envt. So invent a fresh tyvar and use that instead
-- in the envt. So invent a fresh tyvar and use that instead
newTyVarTy_OpenKind `thenNF_Tc` \ tyvar_ty ->
newTyVarTy_OpenKind `thenNF_Tc` \ tyvar_ty ->
...
@@ -158,7 +158,7 @@ tcMatch xve1 match@(Match sig_tvs pats maybe_rhs_sig grhss) expected_ty ctxt
...
@@ -158,7 +158,7 @@ tcMatch xve1 match@(Match sig_tvs pats maybe_rhs_sig grhss) expected_ty ctxt
returnTc match_and_lie
returnTc match_and_lie
where
where
tc_match expe
x
ted_ty -- Any sig tyvars are in scope by now
tc_match expe
c
ted_ty -- Any sig tyvars are in scope by now
= -- STEP 1: Typecheck the patterns
= -- STEP 1: Typecheck the patterns
tcMatchPats pats expected_ty `thenTc` \ (rhs_ty, pats', lie_req1, ex_tvs, pat_bndrs, lie_avail) ->
tcMatchPats pats expected_ty `thenTc` \ (rhs_ty, pats', lie_req1, ex_tvs, pat_bndrs, lie_avail) ->
let
let
...
...
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