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
David Feuer
GHC
Commits
b5541c97
Commit
b5541c97
authored
12 years ago
by
jpm@cs.ox.ac.uk
Browse files
Options
Downloads
Patches
Plain Diff
I think this finally fixes the bug
parent
30455b14
Branches
wip/az/epa-hsdocty
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/typecheck/TcDeriv.lhs
+4
-3
4 additions, 3 deletions
compiler/typecheck/TcDeriv.lhs
with
4 additions
and
3 deletions
compiler/typecheck/TcDeriv.lhs
+
4
−
3
View file @
b5541c97
...
...
@@ -814,7 +814,7 @@ mkOldTypeableEqn orig tvs cls tycon tc_args mtheta
mkPolyKindedTypeableEqn :: CtOrigin -> [TyVar] -> Class -> [TcType]
-> TyCon -> [TcType] -> DerivContext
-> TcM EarlyDerivSpec
mkPolyKindedTypeableEqn orig tvs cls cls_tys tycon tc_args mtheta
mkPolyKindedTypeableEqn orig tvs cls
_
cls_tys tycon tc_args mtheta
-- The kind-polymorphic Typeable class is less special; namely, there is no
-- need to select the class with the right kind anymore, as we only have one.
= do { checkTc (onlyKindVars tc_args)
...
...
@@ -824,14 +824,15 @@ mkPolyKindedTypeableEqn orig tvs cls cls_tys tycon tc_args mtheta
; loc <- getSrcSpanM
; return (Right $
DS { ds_loc = loc, ds_orig = orig, ds_name = dfun_name
, ds_tvs = tvs, ds_cls = cls
, ds_tys =
cls_tys ++
[mkTyConApp tycon tc_args]
, ds_tvs =
filter isKindVar
tvs, ds_cls = cls
, ds_tys =
instKi :
[mkTyConApp tycon tc_args]
, ds_tc = tycon, ds_tc_args = tc_args
, ds_theta = mtheta `orElse` [] -- Context is empty for polykinded Typeable
, ds_newtype = False }) }
where onlyKindVars = and . map (isJKVar . tcGetTyVar_maybe)
isJKVar (Just v) = isKindVar v
isJKVar _ = False
instKi = applyTys (tyConKind tycon) tc_args
----------------------
inferConstraints :: Class -> [TcType]
...
...
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