
Hi, Am Donnerstag, den 19.02.2015, 16:42 +0100 schrieb Christopher Done:
* Some things are foldable cleanly like monoids, so you can just mconcat [x,y,z] and that'll be inlined (I think).
the sufficiently smart compiler might do that, but not this one (GHC 7.8.4). Neither in the generic case of foo :: Monoid a => a -> a -> a -> a -> a -> a foo a b c d e = mconcat [a,b,c,d,e] nor the monomophic case of foo :: String -> String -> String -> String -> String -> String foo a b c d e = mconcat [a,b,c,d,e] BTW, would your proposal extend to types? i.e. foo :: infix (->) String String String String String foo a b c d e = mconcat [a,b,c,d,e] Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0xF0FBF51F Debian Developer: nomeata@debian.org