kolmodin / binary

Efficient, pure binary serialisation using ByteStrings in Haskell.
Other
105 stars 67 forks source link

Generically instance #191

Open Icelandjack opened 2 years ago

Icelandjack commented 2 years ago

Reminder to add an instance for Generically (base 4.17) by copying the default definitions

instance (Generic a, GBinaryPut (Rep a), GBinaryGet (Rep a)) => Binary (Generically a) where
  put :: Generically a -> Put
  put (Generically a) = gput (from a)

  get :: Get (Generically a)
  get = Generically . to <$> gget
Icelandjack commented 2 years ago

Made a pullrequest #192.