
28 Nov
2011
28 Nov
'11
10:01 a.m.
On Monday 28 November 2011, 15:21:56, Rustom Mody wrote:
The Data.Vector.Unboxed page on hackage has the following line
class (Vector Vector a, MVector MVector a) => Unbox a
Can someone explain whats the repeating Vector (and MVector) there?
Vector and MVector both appear as the names of two different things here. The first occurrence is as the name of the (two-parameter) class, class [M]Vector v a where ... and the second occurrence is as the name of a datatype constructor data [M]Vector a = [M]Vector ... In instance declarations, the name can also appear as the name of a third thing, the value constructor ;)