diff options
author | Ian Lynagh <igloo@earth.li> | 2010-05-06 17:53:51 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2010-05-06 17:53:51 +0000 |
commit | c279f61e3762b137c035ca0bae960415a8916f03 (patch) | |
tree | 706a196c36dfc9af8e7d1698bb45d97c01cce091 /compiler | |
parent | bc115352a6211fa8814eb1b584fe5284bf57ca00 (diff) | |
download | haskell-c279f61e3762b137c035ca0bae960415a8916f03.tar.gz |
Enable the "redundant specialise pragmas" warning; fixes trac #3855
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/typecheck/TcBinds.lhs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/typecheck/TcBinds.lhs b/compiler/typecheck/TcBinds.lhs index 2e675ac181..7978dad924 100644 --- a/compiler/typecheck/TcBinds.lhs +++ b/compiler/typecheck/TcBinds.lhs @@ -451,14 +451,12 @@ tcPrags :: RecFlag -- SPECIALISE prags are passed to the desugarer via TcSpecPrags -- Pre-condition: the poly_id is zonked -- Reason: required by tcSubExp -tcPrags _rec_group _multi_bind _is_overloaded_id poly_id prag_sigs +tcPrags _rec_group _multi_bind is_overloaded_id poly_id prag_sigs = do { poly_id' <- tc_inl inl_sigs ; spec_prags <- mapM (wrapLocM (tcSpecPrag poly_id')) spec_sigs --- Commented out until bytestring library removes redundant pragmas --- for packWith and unpackWith --- ; unless (null spec_sigs || is_overloaded_id) warn_discarded_spec + ; unless (null spec_sigs || is_overloaded_id) warn_discarded_spec ; unless (null bad_sigs) warn_discarded_sigs @@ -467,8 +465,8 @@ tcPrags _rec_group _multi_bind _is_overloaded_id poly_id prag_sigs (inl_sigs, other_sigs) = partition isInlineLSig prag_sigs (spec_sigs, bad_sigs) = partition isSpecLSig other_sigs --- warn_discarded_spec = warnPrags poly_id spec_sigs $ --- ptext (sLit "SPECIALISE pragmas for non-overloaded function") + warn_discarded_spec = warnPrags poly_id spec_sigs $ + ptext (sLit "SPECIALISE pragmas for non-overloaded function") warn_dup_inline = warnPrags poly_id inl_sigs $ ptext (sLit "Duplicate INLINE pragmas for") warn_discarded_sigs = warnPrags poly_id bad_sigs $ |