hjugement-protocol-0.0.10.20191104: A cryptographic protocol for the Majority Judgment.

Safe HaskellNone
LanguageHaskell2010

Voting.Protocol.Utils

Contents

Synopsis

Documentation

o2 :: (c -> d) -> (a -> b -> c) -> a -> b -> d infixr 9 Source #

Like (.) but with two arguments.

isoZipWith :: (a -> b -> c) -> [a] -> [b] -> Maybe [c] Source #

NOTE: check the lengths before applying f.

isoZipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> Maybe [d] Source #

NOTE: check the lengths before applying f.

isoZipWithM :: Applicative f => f () -> (a -> b -> f c) -> [a] -> [b] -> f [c] Source #

isoZipWithM_ :: Applicative f => f () -> (a -> b -> f c) -> [a] -> [b] -> f () Source #

isoZipWith3M :: Applicative f => f () -> (a -> b -> c -> f d) -> [a] -> [b] -> [c] -> f [d] Source #

isoZipWith3M_ :: Applicative f => f () -> (a -> b -> c -> f d) -> [a] -> [b] -> [c] -> f () Source #

JSON utils

jsonEitherFormatError :: Either (JSONPath, String) a -> Either String a Source #

Copied from Aeson's eitherFormatError which is not exported.

Parsing utils

Orphan instances

Random Natural Source # 
Instance details

Methods

randomR :: RandomGen g => (Natural, Natural) -> g -> (Natural, g) #

random :: RandomGen g => g -> (Natural, g) #

randomRs :: RandomGen g => (Natural, Natural) -> g -> [Natural] #

randoms :: RandomGen g => g -> [Natural] #

randomRIO :: (Natural, Natural) -> IO Natural #

randomIO :: IO Natural #