kepler icon indicating copy to clipboard operation
kepler copied to clipboard

Change the RawKey class from Iso to Lens'

Open martyall opened this issue 4 years ago • 1 comments

We currently have

class RawKey a where
  rawKey :: Iso a ByteString

but we really don't ever use the from rawKey :: RawKey a => ByteString -> a method at all. We should change the class to

class RawKey a where
  rawKey :: a -> ByteString

martyall avatar Jan 04 '21 15:01 martyall

Might this create a problem with #254 though? I assume currently we never read key bytes from store and deserialize into the type, but when iterating through the Map presumably we would need to be able to turn those bytes back into keys.

UnitylChaos avatar Jan 04 '21 22:01 UnitylChaos