According to Hoogle, the fixity of <=<
(Kleisli monad composition, or "left fish") and =<<
(reverse monad bind) is infixr 1
. If I'm looking at them correctly, an expression like, say
print <=< return =<< return "foo"
should be invalid, since it would've been equivalent to the equally invalid
print <=< (return =<< return "foo")
But for some reason, though the first expression seems to be invalid in Haskell, as expected, Frege seems to have no complaints, and evaluates <=<
before the =<<
.
I discovered this when I was messing around on pointfree.io to figure out how to make something like
foo >>= (bar <=< baz)
point-free, and it gave me
bar <=< baz =<< foo
which doesn't look quite right, considering the fixities.