Skip to content

Add INLINABLE pragma on ‘GHC.Real.RealFrac(Ratio).round’

With -Wall-missed-specialisations I'm getting this warning

bench/common/BenchProdTools.hs: warning: [-Wall-missed-specialisations]
    Could not specialise imported function ‘GHC.Real.$fRealFracRatio_$s$cround’
    Probable fix: add INLINABLE pragma on ‘GHC.Real.$fRealFracRatio_$s$cround’

and indeed this function (https://downloads.haskell.org/ghc/latest/docs/libraries/base-4.18.0.0/src/GHC.Real.html#line-579) seems beneficial to have an unfolding of and plausibly a bit too large for GHC to expose the unfolding of by default.

BTW, I'm also getting

test/simplified/TestAdaptorSimplified.hs: warning: [-Wall-missed-specialisations]
    Could not specialise imported function ‘df1’
      when specialising ‘HordeAd.Core.Delta.$fShowDeltaD_$cshowsPrec1’
    Probable fix: add INLINABLE pragma on ‘df1’

Whom do I ask to add INLINABLE to all the code generated when deriving Show? Or would that make everybody's compile times and disk usage twice larger? I don't particularly mind about the performance of Show, but this is cluttering the output of -Wall-missed-specialisations that I do care about.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information