Commit 6c5d1262 authored by Lennart Kolmodin's avatar Lennart Kolmodin
Browse files

Merge branch 'phadej/version'

parents db201353 67ccd539
......@@ -51,6 +51,9 @@ import Data.Void
import Data.Binary.Put
import Data.Binary.Get
#if ! MIN_VERSION_base(4,8,0)
import Control.Applicative
#endif
import Control.Monad
import Data.ByteString.Lazy (ByteString)
......@@ -90,6 +93,8 @@ import qualified Data.Foldable as Fold
import GHC.Fingerprint
#endif
import Data.Version (Version(..))
------------------------------------------------------------------------
#ifdef GENERICS
......@@ -618,3 +623,11 @@ instance Binary Fingerprint where
x2 <- get
return $! Fingerprint x1 x2
#endif
------------------------------------------------------------------------
-- Version
-- | /Since: binary-0.8/
instance Binary Version where
get = Version <$> get <*> get
put (Version br tags) = put br >> put tags
Markdown is supported
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