Daniel-Diaz / matrix

A Haskell native implementation of matrices and their operations.
BSD 3-Clause "New" or "Revised" License
35 stars 31 forks source link

GHC 8 warnings about REWRITE rules not firing #37

Open istathar opened 8 years ago

istathar commented 8 years ago

Noticed this when building matrix with resolver: nightly-2016-08-06:

Data/Matrix.hs:1330:1: warning: [-Winline-rule-shadowing]
    Rule "matrix/traceOfSum" may never fire
      because ‘trace’ might inline first
    Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘trace’
Data/Matrix.hs:1330:1: warning: [-Winline-rule-shadowing]
    Rule "matrix/traceOfSum" may never fire
      because rule "Class op +" for ‘+’ might fire first
    Probable fix: add phase [n] or [~n] to the competing rule
Data/Matrix.hs:1333:1: warning: [-Winline-rule-shadowing]
    Rule "matrix/traceOfScale" may never fire
      because ‘trace’ might inline first
    Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘trace’
Data/Matrix.hs:1333:1: warning: [-Winline-rule-shadowing]
    Rule "matrix/traceOfScale" may never fire
      because ‘scaleMatrix’ might inline first
    Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘scaleMatrix’
Data/Matrix.hs:1358:1: warning: [-Winline-rule-shadowing]
    Rule "matrix/detLaplaceProduct" may never fire
      because ‘detLaplace’ might inline first
    Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘detLaplace’
Data/Matrix.hs:1358:1: warning: [-Winline-rule-shadowing]
    Rule "matrix/detLaplaceProduct" may never fire
      because rule "Class op *" for ‘*’ might fire first
    Probable fix: add phase [n] or [~n] to the competing rule

Don't know if this is GHC 8 specific or whether this cropped up earlier, but fyi.

AfC

Daniel-Diaz commented 8 years ago

I think these started with GHC 8. Thanks for reporting.