matrix icon indicating copy to clipboard operation
matrix copied to clipboard

Conflict with Alternative's <|>

Open istathar opened this issue 9 years ago • 6 comments
trafficstars

I'm sure you're aware, but an operator named <|> is a part of the Alternative typeclass from Control.Applicative. Since that's in base now, I don't think it's wise for matrix to export a function with the same name for joining blocks.

Not the end of the world.

istathar avatar Sep 12 '16 10:09 istathar

Any proposals as to what it's changed to?

octopuscabbage avatar Sep 16 '16 17:09 octopuscabbage

Right, <|> was a terrible name to choose. We need to change it. I'm happy to see your suggestions. Maybe <||>? The issue with this is backwards compatibility. We should first make a release with both the old and the new name, with the old being marked as deprecated.

Daniel-Diaz avatar Sep 18 '16 03:09 Daniel-Diaz

Seems like the best alternative (no pun intended) I did some Googling and couldn't find a better looking operator. Would we change the vertical join?

octopuscabbage avatar Sep 19 '16 01:09 octopuscabbage

If two lines is your thing, then <=>?

Personally I would just have gone with

one
`above`
two

and

three `beside` four

but that's just me. :)

istathar avatar Oct 03 '16 22:10 istathar

Yeah, the fact that we can't really come up with a good operator makes me think that concatenation isn't really worth an operator. I think your suggestion of above and beside is fine, except it looks kind of weird not infix. Maybe verticalConcat and horizontalConcat or something.

octopuscabbage avatar Oct 05 '16 00:10 octopuscabbage

@Daniel-Diaz do you want to make a decision about this, or are you waiting for a patch before passing judgment?

istathar avatar Nov 27 '16 03:11 istathar