[commit: ghc] ghc-generics: Make TcClassDcl compile (3a5c9d4)
Simon Peyton Jones
simonpj at microsoft.com
Wed Apr 20 16:39:49 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : ghc-generics
http://hackage.haskell.org/trac/ghc/changeset/3a5c9d485332748d9ea85ae99d24adcf810d9788
>---------------------------------------------------------------
commit 3a5c9d485332748d9ea85ae99d24adcf810d9788
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Apr 20 12:56:41 2011 +0100
Make TcClassDcl compile
>---------------------------------------------------------------
compiler/typecheck/TcClassDcl.lhs | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/compiler/typecheck/TcClassDcl.lhs b/compiler/typecheck/TcClassDcl.lhs
index 2e93e90..17b6644 100644
--- a/compiler/typecheck/TcClassDcl.lhs
+++ b/compiler/typecheck/TcClassDcl.lhs
@@ -19,6 +19,7 @@ import RnHsSyn
import Inst
import InstEnv
import TcEnv
+import TcPat( addInlinePrags )
import TcBinds
import TcUnify
import TcHsType
@@ -207,11 +208,11 @@ tcDefMeth clas tyvars this_dict binds_in sigs sig_fn prag_fn (sel_id, dm_info)
`orElse` pprPanic "tcDefMeth" (ppr sel_id)
dm_sig_fn _ = sig_fn sel_name
- dm_prag_fn _ = prag_fn sel_name
+ prags = prag_fn sel_name
- dm_ty = mkSigmaTy tyvars [mkClassPred clas tyvars] local_dm_ty
+ dm_ty = mkSigmaTy tyvars [mkClassPred clas (mkTyVarTys tyvars)] local_dm_ty
dm_id = mkExportedLocalId dm_name dm_ty
- local_dm_id = mkLocalId local_dm_name local_dm_type
+ local_dm_id = mkLocalId local_dm_name local_dm_ty
; dm_id_w_inline <- addInlinePrags dm_id prags
; spec_prags <- tcSpecPrags dm_id prags
@@ -222,7 +223,7 @@ tcDefMeth clas tyvars this_dict binds_in sigs sig_fn prag_fn (sel_id, dm_info)
; dm_bind <- tcInstanceMethodBody (ClsSkol clas) tyvars [this_dict]
dm_id_w_inline local_dm_id dm_sig_fn
- IsDefaultMethodId dm_bind
+ IsDefaultMethod meth_bind
; return (unitBag dm_bind) }
@@ -233,7 +234,7 @@ tcDefMeth clas tyvars this_dict binds_in sigs sig_fn prag_fn (sel_id, dm_info)
; checkValidType (FunSigCtxt sel_name) tau
; return tau }
-findGenericSig :: [LSig Name] -> Name -> LSig Name
+findGenericSig :: [LSig Name] -> Name -> LHsType Name
-- Find the 'generic op :: ty' signature among the sigs
-- If dm_info is GenDefMeth, the corresponding signature
-- should jolly well exist! Hence the panic
More information about the Cvs-ghc
mailing list