Commit 0cd15290 authored by Lennart Kolmodin's avatar Lennart Kolmodin
Browse files

Merge branch 'instance-fingerprint' of https://github.com/mboes/binary

parents 86e4c9a6 551515ec
......@@ -77,6 +77,10 @@ import qualified Data.Sequence as Seq
import qualified Data.Foldable as Fold
#endif
#if __GLASGOW_HASKELL__ >= 704
import GHC.Fingerprint
#endif
------------------------------------------------------------------------
#ifdef GENERICS
......@@ -583,3 +587,17 @@ instance (Binary i, Ix i, Binary e, IArray UArray e) => Binary (UArray i e) wher
n <- get
xs <- getMany n
return (listArray bs xs)
------------------------------------------------------------------------
-- Fingerprints
#if __GLASGOW_HASKELL__ >= 704
instance Binary Fingerprint where
put (Fingerprint x1 x2) = do
put x1
put x2
get = do
x1 <- get
x2 <- get
return (Fingerprint x1 x2)
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment