Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the RawKey class from Iso to Lens' #255

Open
martyall opened this issue Jan 4, 2021 · 1 comment
Open

Change the RawKey class from Iso to Lens' #255

martyall opened this issue Jan 4, 2021 · 1 comment

Comments

@martyall
Copy link
Collaborator

martyall commented Jan 4, 2021

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
@UnitylChaos
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants