http://www.w3.org/ns/prov#value | - Bar a => HasBar a<br><br>class Cls c where<br>????????? foo :: c -> HasBar<br><br>You then have to wrap the result of "foo" by "HasBar"; then you can get the instance back out by case-matching on HasBar.??? This is basically the same as Miguel's solution of returning a dictionary, except the dictionary is implicitly held in the existential instead of explicit.<br>
|