From cc85a1152e4aa98d09b5de2430f5b9eaac9aa4f5 Mon Sep 17 00:00:00 2001 From: Johannes Lund Date: Wed, 15 May 2019 17:11:49 +0200 Subject: [PATCH] some polish --- .../src/Cardano/Wallet/Binary/Jormungandr.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/jormungandr/src/Cardano/Wallet/Binary/Jormungandr.hs b/lib/jormungandr/src/Cardano/Wallet/Binary/Jormungandr.hs index f18f344b975..a50c4f414a2 100644 --- a/lib/jormungandr/src/Cardano/Wallet/Binary/Jormungandr.hs +++ b/lib/jormungandr/src/Cardano/Wallet/Binary/Jormungandr.hs @@ -163,14 +163,15 @@ data ConfigParam | ProposalExpiration Word32 deriving (Eq, Show) --- | @TagLen@ contains the tag/type of a @ConfigParam@ as well as the length +-- | @TagLen@ contains the tag/type of a @ConfigParam@ as well as its length -- in number of bytes. -- -- This information is stored in a /single/ @Word16@ in the binary format. -- (@getTagLen@) -{-# ANN len ("HLint: ignore Defined but not used" :: String) #-} -{-# ANN tag ("HLint: ignore Defined but not used" :: String) #-} -data TagLen = TagLen { tag :: Int, len :: Int} +data TagLen = TagLen + { tag :: Int -- | The kind of @ConfigParam@ + , len :: Int -- | The length of the encoded @ConfigParam@ in bytes + } getTagLen :: Get TagLen getTagLen = do @@ -212,7 +213,6 @@ newtype LeaderId = LeaderId ByteString data LinearFee = LinearFee Word64 Word64 Word64 deriving (Eq, Show) - getDiscrimination :: Get Discrimination getDiscrimination = getWord8 >>= \case 1 -> return Production