Cross-modular insertion of internal modules

I have a package with many internal modules (field other-modules). I believe that it will be useful for me to invest most of the functions in them.

Do I need to go through all the pragmas or GHC inserts through them, and Cabal is smart enough to do inlining on my own? If so, how will this inlay be done? If otherwise I have to go through the insertion of the pragma, which I should prefer: INLINEor INLINABLE(or maybe even a synthetic INLINEfunction ) - and for what reason?

+4
source share
1 answer

GHC .

Core , , , INLINABLE INLINE, .

,

INLINE , "" . .

INLINE ", ", INLINABLE : " , "

INLINABLE, , , , .

, , , , inlining.

+1

Source: https://habr.com/ru/post/1545649/


All Articles