<div dir="ltr"><div dir="ltr"><div>I have a general question:</div><div>I would like to have a type-class C in which types that are instances of C have some type parameters and then a subclass S of C where some of the type parameters of an instance of S are more constrained in some way -- perhaps by being equal and/or being instances of some other class.</div><div><br></div><div>I have an entirely artificial example (att.) that illustrates this situation and struggled (it's a while since I wrote much Haskell) to get it past the ghc type checker until stumbling across GADTs which do seem to do the trick, so I could leave it at that but...</div><div> ...I am very far from sure that this is the correct way to look at the problem and am hoping for some illumination.</div><div><br></div><div>regards</div><div>Lloyd.</div><div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>No AI was used in composing this message.</div><div><br></div><div><br></div></div></div></div></div>
</div>