Restore SPECIALISE INSTANCE pragmas
authorsimonpj@microsoft.com <unknown>
Tue, 22 Feb 2011 17:31:12 +0000 (17:31 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 22 Feb 2011 17:31:12 +0000 (17:31 +0000)
For some reason I'd commented out this code, which
meant that we weren't getting the the goodness of
the SPECIALISE INSTANCE pragamas in GHC.Real. And
that in turn killed performance in nofib 'power'

compiler/typecheck/TcInstDcls.lhs

index ab788d7..3bb27a7 100644 (file)
@@ -644,7 +644,7 @@ tcInstDecl2 (InstInfo { iSpec = ispec, iBinds = ibinds })
 
        -- Deal with 'SPECIALISE instance' pragmas
        -- See Note [SPECIALISE instance pragmas]
-       ; spec_info <- tcSpecInstPrags dfun_id ibinds
+       ; spec_info@(spec_inst_prags,_) <- tcSpecInstPrags dfun_id ibinds
 
         -- Typecheck the methods
        ; (meth_ids, meth_binds) 
@@ -691,7 +691,7 @@ tcInstDecl2 (InstInfo { iSpec = ispec, iBinds = ibinds })
              main_bind = AbsBinds { abs_tvs = inst_tyvars
                                   , abs_ev_vars = dfun_ev_vars
                                   , abs_exports = [(inst_tyvars, dfun_id_w_fun, self_dict,
-                                                    SpecPrags [] {- spec_inst_prags -})]
+                                                    SpecPrags spec_inst_prags)]
                                   , abs_ev_binds = emptyTcEvBinds
                                   , abs_binds = unitBag dict_bind }