Closed Icelandjack closed 8 years ago
Is there a valid Representable instance for Reverse?
Representable
Reverse
instance Representable f => Representable (Reverse f) where type Rep (Reverse f) = Rep f tabulate = Reverse . tabulate index (Reverse f) i = index f i
gives the same result for these two expressions
>>> (!) = index; infixl 6 ! >>> V3 'x' 'y' 'z' ! E _x 'x' >>> Reverse (V3 'x' 'y' 'z') ! E _x 'x'
I was toying around with defining a queue as Product V3 (Reverse V3).
Product V3 (Reverse V3)
Sounds reasonable to me.
Is there a valid
Representable
instance forReverse
?gives the same result for these two expressions