<div dir="ltr"><font face="arial, sans-serif">Thank you Kai-Oliver.<br></font><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">>        <span style="color:rgb(0,0,0);font-size:1em;white-space:pre-wrap">pattern Any2 :: forall . forall a. a -> Some</span></font></div><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, sans-serif">We're friends here. I think I can share that my reaction was a rather loud WTF??!!??</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, sans-serif">And there's not a mention in the docos that this is even a thing. I feel like dragging whoever's responsible to the headmaster's office.</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, sans-serif">Ok that seems to work -- in the sense that pattern-matching on it yields an `x` that's unusable on RHS just as much as the `Any` decl with implicit `forall`, or with no type signature at all.</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, sans-serif">What would be useful is to be able to introduce a constraint into the sig, so I can do something like</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, sans-serif">>    foo (Any2 x) y = x == y</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, sans-serif"><br></font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, sans-serif">After playing with it, all I'm getting is weird rejections. </font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, sans-serif">>    pattern Any2 :: forall . forall a. () => (Eq a) => a -> Some</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, sans-serif"><br></font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, sans-serif">>    * Pattern synonym `Any2' has one argument<br>>        but its type signature has 1 fewer arrows<br></font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, sans-serif">I need to put the constraints inside the scope of the `forall a.`. A single `(Show a) => a -> Some` complains no instance provided.</font></pre><font face="arial, sans-serif"><br class="gmail-Apple-interchange-newline"></font><div><br></div></div>