ouroboros-consensus-0.1.0.1: Consensus layer for the Ouroboros blockchain protocol
Safe Haskell None
Language Haskell2010

Ouroboros.Consensus.HardFork.Combinator.Util.InPairs

Description

Intended for qualified import

import Ouroboros.Consensus.HardFork.Combinator.Util.InPairs (InPairs(..))
import qualified Ouroboros.Consensus.HardFork.Combinator.Util.InPairs as InPairs
Synopsis

InPairs

data InPairs (f :: k -> k -> Type ) (xs :: [k]) where Source #

We have an f x y for each pair (x, y) of successive list elements

Constructors

PNil :: InPairs f '[x]
PCons :: f x y -> InPairs f (y ': zs) -> InPairs f (x ': (y ': zs))

Convenience constructors

mk2 :: f x y -> InPairs f '[x, y] Source #

mk3 :: f x y -> f y z -> InPairs f '[x, y, z] Source #

SOP-like operators

hcmap :: forall proxy c f g xs. All c xs => proxy c -> ( forall x y. (c x, c y) => f x y -> g x y) -> InPairs f xs -> InPairs g xs Source #

hcpure :: forall proxy c xs f. ( All c xs, IsNonEmpty xs) => proxy c -> ( forall x y. (c x, c y) => f x y) -> InPairs f xs Source #

hmap :: SListI xs => ( forall x y. f x y -> g x y) -> InPairs f xs -> InPairs g xs Source #

hpure :: ( SListI xs, IsNonEmpty xs) => ( forall x y. f x y) -> InPairs f xs Source #

Requiring

data Requiring h f x y Source #

Constructors

Require

Fields

data RequiringBoth h f x y Source #

Constructors

RequireBoth

Fields