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
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
Alexander Kaznacheev
GHC
Commits
0cb389e5
Commit
0cb389e5
authored
12 years ago
by
Simon Peyton Jones
Committed by
pcapriotti
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix Trac #7128, by zonking kind varaibles more assiduously when typechecking a class declaration
MERGED from commit
e9491626
parent
6d0e2f28
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
compiler/typecheck/TcHsSyn.lhs
+1
-1
1 addition, 1 deletion
compiler/typecheck/TcHsSyn.lhs
compiler/typecheck/TcTyClsDecls.lhs
+15
-4
15 additions, 4 deletions
compiler/typecheck/TcTyClsDecls.lhs
with
16 additions
and
5 deletions
compiler/typecheck/TcHsSyn.lhs
+
1
−
1
View file @
0cb389e5
...
...
@@ -29,7 +29,7 @@ module TcHsSyn (
zonkTopDecls, zonkTopExpr, zonkTopLExpr,
zonkTopBndrs, zonkTyBndrsX,
emptyZonkEnv, mkEmptyZonkEnv, mkTyVarZonkEnv,
zonkTcTypeToType, zonkTcTypeToTypes
zonkTcTypeToType, zonkTcTypeToTypes
, zonkTyVarOcc,
) where
#include "HsVersions.h"
...
...
This diff is collapsed.
Click to expand it.
compiler/typecheck/TcTyClsDecls.lhs
+
15
−
4
View file @
0cb389e5
...
...
@@ -568,12 +568,15 @@ tcTyClDecl1 _parent calc_isrec
; ctxt' <- tcHsContext ctxt
; ctxt' <- zonkTcTypeToTypes emptyZonkEnv ctxt'
-- Squeeze out any kind unification variables
-- Squeeze out any kind unification variables
; fds' <- mapM (addLocM tc_fundep) fundeps
; (sig_stuff, gen_dm_env) <- tcClassSigs class_name sigs meths
; env <- getLclTypeEnv
; traceTc "tcClassDecl" (ppr fundeps $$ ppr tvs' $$ ppr fds' $$ ppr env)
; return (tvs', ctxt', fds', sig_stuff, gen_dm_env) }
; clas <- fixM $ \ clas -> do
{ let -- This little knot is just so we can get
-- hold of the name of the class TyCon, which we
...
...
@@ -602,9 +605,17 @@ tcTyClDecl1 _parent calc_isrec
-- tying the the type and class declaration type checking knot.
}
where
tc_fundep (tvs1, tvs2) = do { tvs1' <- mapM tc
LookupTyV
ar tvs1 ;
; tvs2' <- mapM tc
LookupTyV
ar tvs2 ;
tc_fundep (tvs1, tvs2) = do { tvs1' <- mapM tc
_fd_tyv
ar tvs1 ;
; tvs2' <- mapM tc
_fd_tyv
ar tvs2 ;
; return (tvs1', tvs2') }
tc_fd_tyvar name -- Scoped kind variables are bound to unification variables
-- which are now fixed, so we can zonk
= do { tv <- tcLookupTyVar name
; ty <- zonkTyVarOcc emptyZonkEnv tv
-- Squeeze out any kind unification variables
; case getTyVar_maybe ty of
Just tv' -> return tv'
Nothing -> pprPanic "tc_fd_tyvar" (ppr name $$ ppr tv $$ ppr ty) }
tcTyClDecl1 _ _
(ForeignType {tcdLName = L _ tc_name, tcdExtName = tc_ext_name})
...
...
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