<div dir="auto">I too am curious about the forall in ScopedTypeVariables. It seems formally unnecessary, so I assume it is designed to avert some kind of inconsistency with standard behavior? Thinking about other extensions, e.g. FlexibleInstances or MultiParamTypeClasses, it seems like they all give meaning to constructs that are forbidden by the standard, while this one actually changes the standard behavior (for the better, imho) and so requires protection by some nonstandard signifier, i.e. forall.</div><div class="gmail_extra"><br><div class="gmail_quote">On Apr 12, 2018 13:27, "Dennis Raddle" <<a href="mailto:dennis.raddle@gmail.com">dennis.raddle@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks!<div><br></div><div>By the way, why do I sometimes have to use forall, and sometimes not? </div><div><br></div><div>I'm also learning Purescript, and I noticed that the examples use 'forall' in every case. Why would it be different with Purescript?</div><div class="signature-text"><div>D</div></div></div><div class="elided-text"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 12, 2018 at 12:51 PM, Brandon Allbery <span dir="ltr"><<a href="mailto:allbery.b@gmail.com" target="_blank" rel="noreferrer">allbery.b@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span><div class="gmail_quote">On Thu, Apr 12, 2018 at 3:47 PM, Dennis Raddle <span dir="ltr"><<a href="mailto:dennis.raddle@gmail.com" target="_blank" rel="noreferrer">dennis.raddle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>myFunc :: a -> b -> c</div><div>myFunc x y z = ...</div><div> where</div><div> helper :: a -> [b]</div><div> helper xx = ...</div><div><br></div><div>Notice that I'm attempting to declare 'helper' using my type variables. I've noticed that this results in an error.</div><div>Is this actually possible, and how?</div></div></blockquote></div><div class="gmail_extra"><br></div></span>You need the ScopedTypeVariables extension, *and* to "declare" the type variables whose scope is to be extended with an explicit "forall" in the signature.<span class="m_-3321723665971193689HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div class="m_-3321723665971193689m_1878463950347775658gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank" rel="noreferrer">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank" rel="noreferrer">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net" target="_blank" rel="noreferrer">http://sinenomine.net</a></div></div></div>
</font></span></div></div>
</blockquote></div><br></div>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</div></blockquote></div><br></div>