<div dir="ltr">Hello,<div><br></div><div>let's get the discussion going on proposal #128.</div><div><br></div><div>Summary:  this proposal generalizes the behavior of type variables in patterns, specifically the variables that do not refer to an explicitly quantified type parameter.   The idea is that such type variables simply introduce a name for their matching type, without placing any restriction on the type.   For example, consider the following definition.</div><div><br></div><div>f (x : [a]) (y : a) = and x</div><div><br></div><div>This would be accepted and it would have type `[Bool] -> Bool -> Bool`.  This proposal is about the meaning of the type signature on `x` which states that it must be a list of something, and `a` will be a name for the type of its elements.   In this case, it happens that `a` is actually just an alias for `Bool`. </div><div><br></div><div>I am strongly in favor of this proposal.   As I mentioned on the github discussion, I thought that the feature already worked as in this proposal, and was quite surprised to find out that currently, GHC has restrictions on what `a` could be, and it also complains about "multiple definitions for `a`" in the above example).</div><div><br></div><div>Thoughts?</div><div><br></div><div>-Iavor</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>