I offer to define the functions of the Control.Category module inlinable:
-- | Right-to-left composition
(<<<) :: Category cat => cat b c -> cat a b -> cat a c
{-# INLINABLE (<<<) #-}
(<<<) = (.)
-- | Left-to-right composition
(>>>) :: Category cat => cat a b -> cat b c -> cat a c
{-# INLINABLE (>>>) #-}
f >>> g = g . f
Perhaps all functions from this module should be marked by this pragma as possible.
I suppose that the current definition without the pragma is the cause why the execution slows down in my applications, when using monad parameters in the constraints. I noticed it yet two or three years ago, while playing with the monad transformers, but decided to write now.
Best regards,
David Sorokin
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Matt
Why can't GHC automatically consider *every* function as INLINABLE? Let the GHC heuristics decide what is worthy of being inlined. What's the downside?
The original post was about INLINEABLE not INLINE – let’s keep thesetwo apart
.At a guess, performance of both .hi file handling and analysis for inlining. Don't people already gripe about how "slow" ghc is?