One issue with this proposal is it makes it <b>completely</b> impossible to pick a type constructor operator that works with both older GHCs and 7.6.<div><br></div><div>It is a fairly elegant choice, but in practice it would force me and many others to stop using them completely for the next couple of years, as I wouldn&#39;t be able to support any users on older GHCs, or if I did I would have to export completely different operator names, and then the users would have to use conditional compilation to do different things with them. =/</div>
<div><br></div><div>As it is, I can and do at least choose : prefixed names for any type constructor I want to have be compatible with old GHCs.</div><div><br></div><div>Back when the change was initially proposed I think it was Igloo who suggested that it might be possible to allow the use of symbols as type variables if they were explicitly quantified by a forall.</div>
<div><br></div><div>Would that be a viable approach?</div><div><br></div><div>-Edward</div><div><div><div><br><div class="gmail_quote">On Fri, Sep 14, 2012 at 7:26 PM, Simon Peyton-Jones <span dir="ltr">&lt;<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">Fair point.  So you are saying it’d be ok to say<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">  data T (.-&gt;)  = MkT (Int .-&gt; Int)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">where (.+) is a type variable?   Leaving ordinary (+) available for type constructors.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">If we are inverting the convention I wonder whether we might invert it completely and use “:” as the “I’m different” herald as we do for *<b>constructor</b>*
 operators in terms.  Thus<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">  data T (:-&gt;)  = MkT (Int :-&gt; Int)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">That seems symmetrical, and perhaps nicer than having a new notation. 
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">                        <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">         In terms                                      In types       
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">-----------------------------------------------------------------------<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">a        Term variable                             Type variable<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">A        Data constructor                         Type constructor<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">+        Term variable operator               Type constructor operator<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">:+      Data constructor operator           Type variable operator<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">Any other opinions?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">Simon<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:conal.elliott@gmail.com" target="_blank">conal.elliott@gmail.com</a> [mailto:<a href="mailto:conal.elliott@gmail.com" target="_blank">conal.elliott@gmail.com</a>]
<b>On Behalf Of </b>Conal Elliott<br>
<b>Sent:</b> 06 September 2012 23:59</span></p><div class="im"><br>
<b>To:</b> Simon Peyton-Jones<br>
<b>Cc:</b> GHC users<br>
</div><div class="im"><b>Subject:</b> Re: Type operators in GHC<u></u><u></u></div><p></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Oh dear. I&#39;m very sorry to have missed this discussion back in January. I&#39;d be awfully sad to lose pretty infix notation for type variables of kind * -&gt; * -&gt; *. I use them extensively in my libraries and projects,
 and pretty notation matters.</p><div><div class="h5"><br>
<br>
I&#39;d be okay switching to some convention other than lack of leading &#39;:&#39; for signaling that a symbol is a type variable rather than constructor, e.g., the *presence* of a leading character such as &#39;.&#39;.<br>

<br>
Given the increasing use of arrow-ish techniques and of type-level programming, I would not classify the up-to-7.4 behavior as a &quot;foolish consistency&quot;, especially going forward.<br>
<br>
-- Conal<br>
<br>
<u></u><u></u></div></div><p></p><div><div class="h5">
<div>
<p class="MsoNormal">On Wed, Jan 18, 2012 at 6:27 AM, Simon Peyton-Jones &lt;<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>&gt; wrote:<u></u><u></u></p>
<p class="MsoNormal">Dear GHC users<br>
<br>
As part of beefing up the kind system, we plan to implement the &quot;Type operators&quot; proposal for Haskell Prime<br>
<a href="http://hackage.haskell.org/trac/haskell-prime/wiki/InfixTypeConstructors" target="_blank">http://hackage.haskell.org/trac/haskell-prime/wiki/InfixTypeConstructors</a><br>
<br>
GHC has had type operators for some kind, so you can say<br>
        data a :+: b = Left a | Right b<br>
but you can only do that for operators which start with &quot;:&quot;.<br>
<br>
As part of the above wiki page you can see the proposal to broaden this to ALL operators, allowing<br>
        data a + b = Left a | Right b<br>
<br>
Although this technically inconsistent the value page (as the wiki page discussed), I think the payoff is huge. (And &quot;A foolish consistency is the hobgoblin of little minds&quot;, Emerson)<br>
<br>
<br>
This email is (a) to highlight the plan, and (b) to ask about flags.  Our preferred approach is to *change* what -XTypeOperators does, to allow type operators that do not start with :.  But that will mean that *some* (strange) programs will stop working. The
 only example I have seen in tc192 of GHC&#39;s test suite<br>
        {-# LANGUAGE TypeOperators #-}<br>
        comp :: Arrow (~&gt;) =&gt; (b~&gt;c, c~&gt;d)~&gt;(b~&gt;d)<br>
      comp = arr (uncurry (&gt;&gt;&gt;))<br>
<br>
Written more conventionally, the signature would look like<br>
        comp :: Arrow arr =&gt; arr (arr b c, arr c d) (arr b d)<br>
      comp = arr (uncurry (&gt;&gt;&gt;))<br>
or, in infix notation<br>
        {-# LANGUAGE TypeOperators #-}<br>
        comp :: Arrow arr =&gt; (b `arr` c, c `arr` d) `arr` (b `arr` d)<br>
      comp = arr (uncurry (&gt;&gt;&gt;))<br>
<br>
But tc192 as it stands would become ILLEGAL, because (~&gt;) would be a type *constructor* rather than (as now) a type *variable*.  Of course it&#39;s easily fixed, as above, but still a breakage is a breakage.<br>
<br>
It would be possible to have two flags, so as to get<br>
  - Haskell 98 behaviour<br>
  - Current TypeOperator behaviuor<br>
  - New TypeOperator behaviour<br>
but it turns out to be Quite Tiresome to do so, and I would much rather not.  Can you live with that?<br>
<br>
<br>
<a href="http://chrisdone.com/posts/2010-10-07-haskelldb-and-typeoperator-madness.html" target="_blank">http://chrisdone.com/posts/2010-10-07-haskelldb-and-typeoperator-madness.html</a><br>
<br>
<br>
_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org" target="_blank">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div></div></div>
</div>
</div>

<br>_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
<br></blockquote></div><br></div></div></div>