base should expose more unfoldings
While building the dhall
package with -Wall-missed-specialisations
I noticed that some unfoldings were apparently not exposed from base
. Here are the relevant warnings:
Could not specialise imported function ‘Data.Data.$w$cgunfold10’
when specialising ‘Data.Data.$fDataMaybe_$cgunfold’
when specialising ‘Data.Data.$fDataMaybe’
Probable fix: add INLINABLE pragma on ‘Data.Data.$w$cgunfold10’
--
src/Dhall/Syntax.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Data.Data.$fDataMaybe_$cdataCast1’
when specialising ‘Data.Data.$fDataMaybe’
Probable fix: add INLINABLE pragma on ‘Data.Data.$fDataMaybe_$cdataCast1’
--
Could not specialise imported function ‘Data.Data.$w$cgmapM16’
when specialising ‘Data.Data.$fDataMaybe_$cgmapM’
when specialising ‘Data.Data.$fDataMaybe’
Probable fix: add INLINABLE pragma on ‘Data.Data.$w$cgmapM16’
--
Could not specialise imported function ‘Data.Data.$w$cgmapMp24’
when specialising ‘Data.Data.$fDataMaybe_$cgmapMp’
when specialising ‘Data.Data.$fDataMaybe’
Probable fix: add INLINABLE pragma on ‘Data.Data.$w$cgmapMp24’
--
Could not specialise imported function ‘Data.Data.$w$cgmapMo19’
when specialising ‘Data.Data.$fDataMaybe_$cgmapMo’
when specialising ‘Data.Data.$fDataMaybe’
Probable fix: add INLINABLE pragma on ‘Data.Data.$w$cgmapMo19’
--
src/Dhall/Syntax.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Data.Data.$fDataNonEmpty_$cgfoldl’
when specialising ‘Data.Data.$fDataNonEmpty’
Probable fix: add INLINABLE pragma on ‘Data.Data.$fDataNonEmpty_$cgfoldl’
--
src/Dhall/Syntax.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Data.Data.$fDataNonEmpty_$cgunfold’
when specialising ‘Data.Data.$fDataNonEmpty’
Probable fix: add INLINABLE pragma on ‘Data.Data.$fDataNonEmpty_$cgunfold’
--
src/Dhall/Syntax.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Data.Data.$fDataNonEmpty_$cdataCast1’
when specialising ‘Data.Data.$fDataNonEmpty’
Probable fix: add INLINABLE pragma on ‘Data.Data.$fDataNonEmpty_$cdataCast1’
--
when specialising ‘Data.Data.$fData[]’
when specialising ‘Data.Data.$fDataNonEmpty2’
when specialising ‘Data.Data.$fDataNonEmpty’
Probable fix: add INLINABLE pragma on ‘Data.Data.$fData[]_$cdataCast1’
--
src/Dhall/Syntax.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Data.Data.$fDataNonEmpty_$cgmapQl’
when specialising ‘Data.Data.$fDataNonEmpty’
Probable fix: add INLINABLE pragma on ‘Data.Data.$fDataNonEmpty_$cgmapQl’
--
Could not specialise imported function ‘Data.Data.$w$cgmapQr1’
when specialising ‘Data.Data.$fDataNonEmpty_$cgmapQr’
when specialising ‘Data.Data.$fDataNonEmpty’
Probable fix: add INLINABLE pragma on ‘Data.Data.$w$cgmapQr1’
--
src/Dhall/Syntax.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Data.Data.$fDataNonEmpty_$cgmapQi’
when specialising ‘Data.Data.$fDataNonEmpty’
Probable fix: add INLINABLE pragma on ‘Data.Data.$fDataNonEmpty_$cgmapQi’
--
src/Dhall/Syntax.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Data.Data.$fDataNonEmpty_$cgmapM’
when specialising ‘Data.Data.$fDataNonEmpty’
Probable fix: add INLINABLE pragma on ‘Data.Data.$fDataNonEmpty_$cgmapM’
--
Could not specialise imported function ‘Data.Data.$w$cgmapMp40’
when specialising ‘Data.Data.$fDataNonEmpty_$cgmapMp’
when specialising ‘Data.Data.$fDataNonEmpty’
Probable fix: add INLINABLE pragma on ‘Data.Data.$w$cgmapMp40’
--
src/Dhall/Syntax.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Data.Traversable.$w$ctraverse1’
when specialising ‘Data.Traversable.$fTraversableEither_$ctraverse’
Probable fix: add INLINABLE pragma on ‘Data.Traversable.$w$ctraverse1’
--
src/Dhall/Syntax.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Data.Traversable.$w$ctraverse2’
when specialising ‘Data.Traversable.$fTraversableFirst_$ctraverse’
Probable fix: add INLINABLE pragma on ‘Data.Traversable.$w$ctraverse2’
--
when specialising ‘Data.Traversable.$fTraversableEither_$ctraverse’
when specialising ‘unsafeSubExpressions’
when specialising ‘subExpressions’
Probable fix: add INLINABLE pragma on ‘Data.Traversable.$w$ctraverse1’
--
when specialising ‘Data.Traversable.$fTraversableFirst_$ctraverse’
when specialising ‘unsafeSubExpressions’
when specialising ‘subExpressions’
Probable fix: add INLINABLE pragma on ‘Data.Traversable.$w$ctraverse2’
--
src/Dhall/Parser/Token.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Control.Applicative.$woptional’
when specialising ‘optional’
Probable fix: add INLINABLE pragma on ‘Control.Applicative.$woptional’
--
src/Dhall/Parser/Expression.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Control.Applicative.$woptional’
when specialising ‘optional’
Probable fix: add INLINABLE pragma on ‘Control.Applicative.$woptional’
--
when specialising ‘Data.Traversable.$fTraversableEither_$ctraverse’
when specialising ‘Dhall.Syntax.unsafeSubExpressions’
when specialising ‘subExpressions’
Probable fix: add INLINABLE pragma on ‘Data.Traversable.$w$ctraverse1’
--
when specialising ‘Data.Traversable.$fTraversableFirst_$ctraverse’
when specialising ‘Dhall.Syntax.unsafeSubExpressions’
when specialising ‘subExpressions’
Probable fix: add INLINABLE pragma on ‘Data.Traversable.$w$ctraverse2’
--
when specialising ‘Data.Semigroup.$fSemigroupMax_$csconcat’
when specialising ‘Data.Semigroup.$fSemigroupMax’
when specialising ‘Data.Semigroup.$fMonoidMax’
Probable fix: add INLINABLE pragma on ‘Data.Semigroup.$w$csconcat’
--
src/Dhall/TypeCheck.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Data.Semigroup.$fMonoidMax_$cmconcat’
when specialising ‘Data.Semigroup.$fMonoidMax’
Probable fix: add INLINABLE pragma on ‘Data.Semigroup.$fMonoidMax_$cmconcat’
--
Could not specialise imported function ‘Data.Traversable.$w$ctraverse1’
when specialising ‘Data.Traversable.$fTraversableEither_$ctraverse’
when specialising ‘Syntax.unsafeSubExpressions’
Probable fix: add INLINABLE pragma on ‘Data.Traversable.$w$ctraverse1’
--
Could not specialise imported function ‘Data.Traversable.$w$ctraverse2’
when specialising ‘Data.Traversable.$fTraversableFirst_$ctraverse’
when specialising ‘Syntax.unsafeSubExpressions’
Probable fix: add INLINABLE pragma on ‘Data.Traversable.$w$ctraverse2’
--
src/Dhall/Freeze.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Data.Foldable.$wtraverse_’
when specialising ‘Data.Foldable.traverse_’
Probable fix: add INLINABLE pragma on ‘Data.Foldable.$wtraverse_’
--
when specialising ‘Data.Traversable.$fTraversableEither_$ctraverse’
when specialising ‘Dhall.Syntax.unsafeSubExpressions’
when specialising ‘Core.subExpressions’
Probable fix: add INLINABLE pragma on ‘Data.Traversable.$w$ctraverse1’
--
when specialising ‘Data.Traversable.$fTraversableFirst_$ctraverse’
when specialising ‘Dhall.Syntax.unsafeSubExpressions’
when specialising ‘Core.subExpressions’
Probable fix: add INLINABLE pragma on ‘Data.Traversable.$w$ctraverse2’
--
Could not specialise imported function ‘Data.Functor.Compose.$w$c*>’
when specialising ‘Data.Functor.Compose.$fApplicativeCompose2’
when specialising ‘Data.Functor.Compose.$fApplicativeCompose’
Probable fix: add INLINABLE pragma on ‘Data.Functor.Compose.$w$c*>’
--
src/Dhall.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Data.Functor.Product.$w$c*>’
when specialising ‘Data.Functor.Product.$fApplicativeProduct_$c*>’
Probable fix: add INLINABLE pragma on ‘Data.Functor.Product.$w$c*>’
--
src/Dhall/Repl.hs: warning: [-Wall-missed-specialisations]
Could not specialise imported function ‘Data.Foldable.$wmapM_’
when specialising ‘mapM_’
Probable fix: add INLINABLE pragma on ‘Data.Foldable.$wmapM_’
Are there good reasons for any of these not to be exposed? Could base
possibly simply expose everything, e.g. via -fexpose-all-unfoldings
?!
The warnings were produced with GHC 8.10.4 / base-4.14.1.0
.