Re: Coping with multiple meanings of `<>`

2021-12-15 Thread Sylvain Henry
Hi Norman, Usually in the compiler Semigoup's <> is imported qualified. But I agree it's ugly. The trouble with Outputable's <> is that: 1) it doesn't have the same associativity as Semigroup's <> 2) <+> interacts weirdly with <> (cf https://mail.haskell.org/pipermail/libraries/2011-November/

Coping with multiple meanings of `<>`

2021-12-14 Thread Norman Ramsey
I find myself wanting to define instances of Semigroup (and Monoid) in a file that also imports GHC.Utils.Outputable and its `<>` operation on SDocs. At the moment I am dealing with the incompatibility by hiding the Outputable version and instead of writing `s1 <> s2` I write `hcat [s1, s2]`. Thi