
30 Aug
2013
30 Aug
'13
12:45 p.m.
On Fri, Aug 30, 2013 at 05:44:57PM +0200, Bas van Dijk wrote:
I was just bitten by the fact that the type constructor Compose from Data.Functor.Compose associates to the left instead of to the right like function composition.
I would like to propose adding the following to Data.Functor.Compose:
infixr 9 `Compose` -- analogous to the fixity of (.)
Hmm, in standard Haskell there are no infix type constructors, so this just sets the fixity of the newtype constructor of the same name (which of course can't be used infix either). Though if it's imported by a module with LANGUAGE TypeOperators the declared fixity is attached to the type constructor too (in GHC). So I guess it's harmless for standard Haskell code but may be useful in GHC Haskell.