
Google seems to barf on '<+>'. I've found a haskell "list of operators", and it's not mentioned. Could some kind soul point me at documentation for this thing? - Allen S. Rout

http://www.haskell.org/hoogle/?hoogle=%3C%2B%3E
On Mon, Nov 7, 2011 at 1:16 PM, Allen S. Rout
Google seems to barf on '<+>'. I've found a haskell "list of operators", and it's not mentioned.
Could some kind soul point me at documentation for this thing?
- Allen S. Rout
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

On Monday 07 November 2011, 19:16:51, Allen S. Rout wrote:
Google seems to barf on '<+>'. I've found a haskell "list of operators", and it's not mentioned.
Could some kind soul point me at documentation for this thing?
Try hoogle: http://www.haskell.org/hoogle/?hoogle=%3C%2B%3E (a few hits, searches only a restricted number of packages) or hayoo: http://holumbus.fh-wedel.de/hayoo/hayoo.html?query=%3C%2B%3E (none found for this one :-( ) Or look at the ghc docs for stuff in the basic libraries: http://haskell.org/ghc/docs/7.0-latest/html/libraries/doc-index-60.html You may be looking for a different <+>, though. Unfortunately, afaik, there's no global hackage index of names.

On Mon, Nov 07, 2011 at 01:16:51PM -0500, Allen S. Rout wrote:
Google seems to barf on '<+>'. I've found a haskell "list of operators", and it's not mentioned.
Could some kind soul point me at documentation for this thing?
- Allen S. Rout
In theory there could be many different definitions of <+> in many different packages. Off the top of my head I do not know of a "standard" meaning for it. Why are you looking for it? Did you see it used somewhere in particular? -Brent

Hi,
It's part of the "Arrows" system, see: http://www.haskell.org/arrows/
and http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Arr...
On Tue, Nov 8, 2011 at 3:47 AM, Brent Yorgey
On Mon, Nov 07, 2011 at 01:16:51PM -0500, Allen S. Rout wrote:
Google seems to barf on '<+>'. I've found a haskell "list of operators", and it's not mentioned.
Could some kind soul point me at documentation for this thing?
- Allen S. Rout
In theory there could be many different definitions of <+> in many different packages. Off the top of my head I do not know of a "standard" meaning for it. Why are you looking for it? Did you see it used somewhere in particular?
-Brent
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
--
Jared Wigmore

"Allen S. Rout"
Google seems to barf on '<+>'. I've found a haskell "list of operators", and it's not mentioned.
Could some kind soul point me at documentation for this thing?
This is the combination operator from the ArrowPlus type class for arrows, which can be combined in a monoidic fashion. It corresponds to (<|>) from the Alternative type class and in fact you can give a trivial Alternative instance for every arrow that is both ArrowPlus and ArrowZero. Reasonable laws would be: zeroArrow <+> a = a <+> zeroArrow = a But I don't think that's official. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://ertes.de/

On Wed, Nov 09, 2011 at 07:15:18PM +0100, Ertugrul Soeylemez wrote:
"Allen S. Rout"
wrote: Google seems to barf on '<+>'. I've found a haskell "list of operators", and it's not mentioned.
Could some kind soul point me at documentation for this thing?
This is the combination operator from the ArrowPlus type class for arrows, which can be combined in a monoidic fashion. It corresponds to (<|>) from the Alternative type class and in fact you can give a trivial Alternative instance for every arrow that is both ArrowPlus and ArrowZero. Reasonable laws would be:
zeroArrow <+> a = a <+> zeroArrow = a
But I don't think that's official.
Let me point out again, just so the OP is not confused: it completely depends where you saw the <+>. There is no "standard" meaning, although the ArrowPlus one that Ertugrul mentions is common. But you could have seen it in some module where the author defines <+> to mean something completely different. Until you tell us where you saw this <+> we cannot really help. In fact, Allen, I now recall seeing you on the xmonad mailing list -- perhaps you saw <+> in an xmonad config? In that case, indeed, it is NOT the ArrowPlus operator, but something defined by xmonad. In the context of xmonad, <+> is used for combining ManageHooks (actually, it can be used to combine any two things which have a type that is an instance of the 'Monoid' type class, but is most commonly used for ManageHooks). -Brent

On 11/09/2011 01:24 PM, Brent Yorgey wrote:
In fact, Allen, I now recall seeing you on the xmonad mailing list -- perhaps you saw<+> in an xmonad config? In that case, indeed, it is NOT the ArrowPlus operator, but something defined by xmonad. In the context of xmonad,<+> is used for combining ManageHooks (actually, it can be used to combine any two things which have a type that is an instance of the 'Monoid' type class, but is most commonly used for ManageHooks).
Yes, indeed. The message I summarise from all of this is that <+> isn't an official piece of language, it's in a formal fringe that might be enclosed in the future, but for the moment is a local convention whose meaning is merely colloquially influenced by formal uses. I figured I'd pick up the conversation in xmonad-land when I had something approximating a concise question. Digressing, let me say 'thanks' for the variety of useful answers I've gotten from the haskell community on this acknowledgedly ignorant couple of questions. :) - Allen S. Rout
participants (6)
-
Allen S. Rout
-
Brent Yorgey
-
Daniel Fischer
-
David McBride
-
Ertugrul Soeylemez
-
Jared Wigmore