[Haskell-cafe] Proposal: Infix expression keyword: -XInfixExpressions

Christopher Done chrisdone at gmail.com
Fri Feb 20 13:06:08 UTC 2015


On 20 February 2015 at 14:02, Joachim Breitner <mail at joachim-breitner.de> wrote:
> 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]

Huh, really? Good to know. I'll update the doc. :-)

> 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]

Could do, that would come in handy for HList kind of constructions too.


More information about the Haskell-Cafe mailing list