[Haskell-cafe] INLINE pragmas on unexported accessor functions

Timotej Tomandl tomandltimotej at gmail.com
Wed May 17 01:22:12 UTC 2017


I have the following accessor function, which is not exported out of the

{-# INLINE left #-}
left :: forall k. (Ord k) => Node k ->Node k
left NullNode = NullNode
left (Node _ l _) = l

just for completness the type of Node is

data Node k = NullNode | Node k (Node k) (Node k)

I have determined upon inspecting the Core from ddump-simpl, that the
INLINE pragma makes no difference, as such I would like to ask what's the
convention/rule of thumb in the case of INLINE/INLINABLE pragmas on
unexported accessor functions?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170517/1b425b61/attachment.html>

More information about the Haskell-Cafe mailing list