Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
f238dae7
Commit
f238dae7
authored
Apr 17, 2003
by
simonpj
Browse files
[project @ 2003-04-17 15:22:38 by simonpj]
Comments
parent
989039af
Changes
2
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/typecheck/TcClassDcl.lhs
View file @
f238dae7
...
...
@@ -372,14 +372,7 @@ tcDefMeth clas tyvars binds_in prags (_, GenDefMeth) = returnM (EmptyMonoBinds,
tcDefMeth clas tyvars binds_in prags op_item@(sel_id, DefMeth dm_name)
= tcInstTyVars ClsTv tyvars `thenM` \ (clas_tyvars, inst_tys, _) ->
let
dm_ty = idType sel_id -- Same as dict selector!
-- The default method's type should really come from the
-- iface file, since it could be usage-generalised, but this
-- requires altering the mess of knots in TcModule and I'm
-- too scared to do that. Instead, I have disabled generalisation
-- of types of default methods (and dict funs) by annotating them
-- TyGenNever (in MkId). Ugh! KSW 1999-09.
dm_ty = idType sel_id -- Same as dict selector!
theta = [mkClassPred clas inst_tys]
local_dm_id = mkDefaultMethodId dm_name dm_ty
xtve = tyvars `zip` clas_tyvars
...
...
ghc/compiler/typecheck/TcInstDcls.lhs
View file @
f238dae7
...
...
@@ -489,7 +489,7 @@ tcInstDecl2 (InstInfo { iDFunId = dfun_id, iBinds = binds })
addSrcLoc (getSrcLoc dfun_id) $
addErrCtxt (instDeclCtxt (toHsType (idType dfun_id))) $
let
inst_ty = idType dfun_id
inst_ty
= idType dfun_id
(inst_tyvars, _) = tcSplitForAllTys inst_ty
-- The tyvars of the instance decl scope over the 'where' part
-- Those tyvars are inside the dfun_id's type, which is a bit
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment