<div dir="ltr">This is already a separate extension: PatternSignatures. However, that extension is deprecated for some reason.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 6, 2013 at 2:46 PM, Evan Laforge <span dir="ltr">&lt;<a href="mailto:qdunkan@gmail.com" target="_blank">qdunkan@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Occasionally I have to explicitly add a type annotation, either for<br>
clarity or to help choose a typeclass instance.  Usually top-level<br>
type annotations take care of this, but sometimes it&#39;s convenient to<br>
only annotate a certain value, e.g. one argument of a lambda.<br>
<br>
I&#39;ve noticed that while vanilla haskell is happy to allow me to put<br>
type annotations on variables where they are used (e.g. &#39;\x -&gt; f (x ::<br>
T)&#39;), if I put it on the variable where it is bound (e.g. &#39;\(x :: T)<br>
-&gt; f x&#39;), it wants me to turn on ScopedTypeVariables.<br>
<br>
I think ScopedTypeVariables is a nice extension and I&#39;m sure it comes<br>
from a perfectly respectable family and all, but it feels like<br>
annotations on arguments comes in as a side-effect.<br>
<br>
Would it make sense to split it into a separate extension like<br>
TypesOnArguments so I can more accurately express my deviation from<br>
haskell2010 orthodoxy?  Or is there some deeper tie between scoped<br>
type variables and annotations on arguments?<br>
<br>
Now that I think of it, it seems inconsistent that &#39;x :: A -&gt; B; x a =<br>
...&#39; is valid, but &#39;x = \(a :: A) -&gt; (...) :: B&#39; is not.  Doesn&#39;t the<br>
former desugar to the latter?<br>
<br>
And what about getting ScopedTypeVariables into haskell prime?  As far<br>
as I know everyone loves it, or at least no one actually hates it :)<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div>