Add a GHC flag for making every functions in a module inlinable
Motivation
When writing code that uses transformer-based effect systems (mtl
, fused-effects
). We often need to specialize functions at call sites since functions with unknown monad prevent other optimizations (inlining >>=
, ask
, get
...). To ensure that happens we need to mark every function inlinable which is very tedious. It would be great to add a GHC flag that does this.
Proposal
Add a GHC flag for making every functions in a module inlinable