<div dir="ltr">Hello Oleg,<div><br></div><div>nicely done!   I wrote the `GHC.TypeLits` module, and the original plan was that it should just provide the basics needed by the compiler, and other libraries would define a nicer user-facing interface.   So, with this in mind, `AppendSymbol` makes a lot of sense to me.  However, the original plan didn't quite happen, and everyone seems to be using `GHC.TypeLits` directly, so maybe picking a shorter name is a good idea.</div><div><br></div><div>To me, personally, `(<>)` and `(++)` look the nicest.  I agree with you that `(++)` might suggest that the arguments are type-level lists, which they aren't.   OTOH, `(<>)` looks a lot like `(:<>:)`, which is also defined in `GHC.TypeLits` and is used for horizontal concatenation of error messages.</div><div><br></div><div>Cheers,</div><div>-Iavor</div><div><br></div><div><br></div><div><br></div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 25, 2016 at 8:28 AM, Oleg Grenrus <span dir="ltr"><<a href="mailto:oleg.grenrus@iki.fi" target="_blank">oleg.grenrus@iki.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">There is an issue #1216: "concatenation of type level symbols missing" [1].<div><br></div><div>I made a working patch, but we need to figure out the details.</div><div>As the patch introduces new non-obvious name to the base library, I’m starting a thread in libraries@ to figure out community's opinion.</div><div><br></div><div>I’m proposing to add `type family (n :: Symbol) <> (m :: Symbol)` to `GHC.TypeLits`.</div><div><br></div><div>Currently implementation uses (<>). Another options are (++), (+++) or `AppendSymbol`.</div><div><br></div><div>- (<>) resembles Semigroup operation, as (+) resembles Num operation</div><div>- (++) is a list appending operation. IMHO it’s a bad choice</div><div>- (+++) is used by ghc-typelits-symbols plugin</div><div>- `AppendSymbol` is sensible too, if libraries want to define own versions of type-level (<>) (e.g. polykinded)</div><div><br></div><div>Discussion period: 2 weeks.</div><div><br></div><div>Cheers,</div><div>Oleg Grenrus.</div><div><br></div><div><div>- [1] <a href="https://ghc.haskell.org/trac/ghc/ticket/12162" target="_blank">https://ghc.haskell.org/<wbr>trac/ghc/ticket/12162</a> </div></div><div>- [2] <a href="https://github.com/konn/ghc-typelits-symbols/blob/cd812f4cfc2e6816a18283a6a0e9bb2d9ea2905e/src/GHC/TypeLits/Symbols/Internal.hs#L6-L8" target="_blank">https://github.com/konn/<wbr>ghc-typelits-symbols/blob/<wbr>cd812f4cfc2e6816a18283a6a0e9bb<wbr>2d9ea2905e/src/GHC/TypeLits/<wbr>Symbols/Internal.hs#L6-L8</a></div></div><br>______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div>