According to Hoogle, the fixation <=< (composition of the Claysley monad or "left fish") and =<< (inverse monad-binding) is infixr 1 . If I look at them correctly, an expression like, say
print <=< return =<< return "foo"
must be invalid because it would be equivalent to equally invalid
print <=< (return =<< return "foo")
But for some reason, although the first expression seems to be invalid in Haskell, as expected, Frege does not seem to have complaints, and evaluates <=< to =<< .
I discovered this when I was messing around pointfree.io to figure out how to do something like
foo >>= (bar <=< baz)
point-free and he gave me
bar <=< baz =<< foo
which doesn’t look quite right, given the problems.
source share