
22 Jun
2015
22 Jun
'15
6:49 a.m.
I would think that it is not possible to use types to constrain the values of data. I.e. type signature can be only used to constraint types, not values. But I am a beginner myself, so see if someone more experienced can shed light here. Martin Matt Williams:
Dear All,
I wonder if/ how this is possible?
I have a constructor which takes 2 pairs of type t).
However, I want to ensure that the pairs are matched:
MyP = MyP (t, t) (t, t)
But where the first pair contains the same elements as the second, but reversed in order.
Any help much appreciated.
BW, Matt
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners