<div dir="ltr">View pattern support right pre-7.10 is fairly limited in that you have to write a chunk of code that can be interpreted as both a pattern and an expression, or limit yourself to just using the syntax for matching. <div><br></div><div>Afterwards, this opens up a bit, and we get the new syntax for complex bidirectional pattern synonyms, as I recall, so you could make a view pattern for `:<` or something that does this, but we don't have a standard class for it.</div><div><br></div><div>-Edward</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 17, 2015 at 1:44 PM, Henning Thielemann <span dir="ltr"><<a href="mailto:lemming@henning-thielemann.de" target="_blank">lemming@henning-thielemann.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On Tue, 17 Feb 2015, Edward Kmett wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The existing IsList machinery gets you the [], [x], and [x,y] cases, but not (x:xs).<br>
</blockquote>
<br></span>
What about the view patterns?<br>
</blockquote></div><br></div>