Skip to content

base/Data.Functor fixity declarations misordered

The fixity declarations for <&> and $> are swapped. (It looks correct with that of <&> immediately following its declaration, but in fact they seem to be intended to precede the declaration, with a - in this case, huge - comment in-between.) The order of things is:

infixl 4 <$>

--
(<$>) ::
(<$>) =

infixl 4 $>

--
(<&>) ::
as <&> f =

infixl 1 <&>

--
($>) ::
($>) =

According to https://www.haskell.org/onlinereport/decls.html#fixity, "a fixity declaration can only occur in the same sequence of declarations as the declaration of the operator itself". So maybe the precedence of $> is actually silently taken as the default 9? I hope I'm missing something here.

Edited by leiftw
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information