[<<][rtl][>>][..]
Sat Apr 20 12:26:27 EDT 2019

Why is this uninituitive?


this is clear:
Ring m t -> Ring m (C t)

why should this be different:
Seq m r  -> Ring m (r t)


The former means, given that Ring operations are defined for t, here's
a way to define Ring operations for C t.

The latter means, given that there is an implementation for Seq,
here's a way to implement Ring.

There isn't anything wrong with this, but what is clear is that it
should not be the only instance maybe?  Maybe r just needs to be made
explicit.

This smells like a detail.  Something not really that important.

EDIT: Yes it's a detail.  It's probably possible to remove it using
some more "pinning" of type classes, but basically the problem is that
the compiler doesn't know that the C type is not used as a
representation.  In practice it seems that m and t are never generic
when this class is instantiated so it is not an issue.

EDIT: Looks like this is going to happen a lot.




[Reply][About]
[<<][rtl][>>][..]