Declaring variance of class parameters?

27 Feb
2007
27 Feb
'07
2 p.m.
If I have a class, say class Symantics repr where int:: Int -> repr Int and so on, I would like to *require* that 'repr' be covariant. Is there any way to do that? Jacques

27 Feb
27 Feb
2:03 p.m.
On Tue, Feb 27, 2007 at 02:00:29PM -0500, Jacques Carette wrote:
If I have a class, say class Symantics repr where int:: Int -> repr Int
and so on, I would like to *require* that 'repr' be covariant. Is there any way to do that?
class Functor repr => Symantics repr would be pretty close, and has the virtue of saying what you mean.
6658
Age (days ago)
6658
Last active (days ago)
1 comments
2 participants
participants (2)
-
Jacques Carette
-
Ross Paterson