-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Generic Data.Binary instances using MultiRec. -- -- Generic Data.Binary instances using MultiRec. @package multirec-binary @version 0.0.1 -- | Generic Data.Binary instances. -- -- You can use these generic functions to create a Data.Binary instance. -- For example, for the Expr data type from the AST example from the -- MutliRec distribution: -- --
--   import Data.Binary
--   import Generics.MultiRec.Base
--   import Generics.MultiRec.Binary
--   
--   instance Binary Expr where
--     put = gput AST
--     get = gget AST
--   
module Generics.MultiRec.Binary class HBinary phi f hput :: (HBinary phi f) => (forall ix'. phi ix' -> r ix' -> Put) -> phi ix -> f r ix -> Put hget :: (HBinary phi f) => (forall ix'. (El phi ix') => phi ix' -> Get (r ix')) -> phi ix -> Get (f r ix) -- | Generic binary Put. gput :: (Fam phi, HBinary phi (PF phi)) => phi ix -> ix -> Put -- | Generic binary Get. gget :: (Fam phi, HBinary phi (PF phi)) => phi ix -> Get ix instance (Constructor c, HBinary phi f) => HBinary phi (C c f) instance (EqS phi, El phi ix, HBinary phi f) => HBinary phi (f :>: ix) instance (HBinary phi f, HBinary phi g) => HBinary phi (f :*: g) instance (HBinary phi f, HBinary phi g) => HBinary phi (f :+: g) instance HBinary phi U instance (Binary a) => HBinary phi (K a) instance (El phi xi) => HBinary phi (I xi)