<commit_before>{-# LANGUAGE BangPatterns        #-}
{-# LANGUAGE Rank2Types          #-}
{-# LANGUAGE ScopedTypeVariables #-}

-- | Functions which operate on MonadPoll[Read].

module Pos.Update.Poll.Functions
       ( verifyAndApplyUSPayload
       , rollbackUSPayload
       , normalizePoll
       ) where

import           Control.Lens          (at, view, (^.))
import           Control.Monad.Except  (MonadError, throwError)
import qualified Data.HashMap.Strict   as HM
import           Data.List             (partition)
import           Data.List.NonEmpty    (NonEmpty)
import qualified Data.List.NonEmpty    as NE
import           Exceptions            (note)
import           Universum

import           Pos.Constants         (updateProposalThreshold, updateVoteThreshold)
import           Pos.Crypto            (PublicKey, hash)
import           Pos.Types             (ChainDifficulty, Coin, EpochIndex,
                                        MainBlockHeader, SlotId (siEpoch),
                                        SoftwareVersion (..), addressHash,
                                        applyCoinPortion, coinToInteger, difficultyL,
                                        epochIndexL, headerSlot, sumCoins, unsafeAddCoin,
                                        unsafeIntegerToCoin, unsafeSubCoin)
import           Pos.Update.Core       (UpId, UpdatePayload (..), UpdateProposal (..),
                                        UpdateVote (..), combineVotes, isPositiveVote,
                                        newVoteState)<commit_msg>[CSL-616] Fix consequences of merge<commit_after>{-# LANGUAGE BangPatterns        #-}
{-# LANGUAGE Rank2Types          #-}
{-# LANGUAGE ScopedTypeVariables #-}

-- | Functions which operate on MonadPoll[Read].

module Pos.Update.Poll.Functions
       ( verifyAndApplyUSPayload
       , rollbackUSPayload
       , normalizePoll
       ) where

import           Control.Lens          (at)
import           Control.Monad.Except  (MonadError, throwError)
import qualified Data.HashMap.Strict   as HM
import           Data.List             (partition)
import           Data.List.NonEmpty    (NonEmpty)
import qualified Data.List.NonEmpty    as NE
import           Exceptions            (note)
import           Universum

import           Pos.Constants         (updateProposalThreshold, updateVoteThreshold)
import           Pos.Crypto            (PublicKey, hash)
import           Pos.Types             (ChainDifficulty, Coin, EpochIndex,
                                        MainBlockHeader, SlotId (siEpoch),
                                        SoftwareVersion (..), addressHash,
                                        applyCoinPortion, coinToInteger, difficultyL,
                                        epochIndexL, headerSlot, sumCoins, unsafeAddCoin,
                                        unsafeIntegerToCoin, unsafeSubCoin)
import           Pos.Update.Core       (UpId, UpdatePayload (..), UpdateProposal (..),
                                        UpdateVote (..), combineVotes, isPositiveVote,
                                        newVoteState)
{'fraction_non_alphanumeric': 0.07284980744544288, 'fraction_numerical': 0.0016046213093709885, 'mean_word_length': 1.4294621979734996, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4130204', 'n_tokens_mistral': 740, 'n_tokens_neox': 724, 'n_words': 168}