<div dir="ltr"><div>Dear GHC devs,</div><div>I am trying to figure out a way to obtain the constraints that hold over a type. Let me give you an example: suppose that I write the following function:</div><div><br></div><div>f :: Eq a => [a] -> Bool</div><div>f xs = xs == []</div><div><br></div><div>If I ask for the type of the Var ' xs', I get back '[a]'. This is correct, but I am missing the crucial information that '[a]' must be Eq.</div><div><br></div><div>Is there an easy way to get it? It seems that 'varType' doesn't give me enough information.</div><div><br></div><div>Regards,</div><div>Alejandro<br></div></div>