shrun
Safe HaskellNone
LanguageGHC2021

Shrun.Command.Types.Internal

Contents

Description

Internal module. Take care as usage can violate invariants.

Synopsis

Index

newtype CommandIndex Source #

Numeric index for each command, for handling command graph dependencies. Conversion to/from Vertex should use indexToVertex and indexFromVertex, as CommandIndex is 1-based whereas Vertex is 0-based.

Constructors

MkCommandIndex 

Instances

Instances details
ASemigroup CommandIndex Source # 
Instance details

Defined in Shrun.Command.Types.Internal

MMonoid CommandIndex Source # 
Instance details

Defined in Shrun.Command.Types.Internal

MSemigroup CommandIndex Source # 
Instance details

Defined in Shrun.Command.Types.Internal

NFData CommandIndex Source # 
Instance details

Defined in Shrun.Command.Types.Internal

Methods

rnf :: CommandIndex -> () #

Enum CommandIndex Source # 
Instance details

Defined in Shrun.Command.Types.Internal

Generic CommandIndex Source # 
Instance details

Defined in Shrun.Command.Types.Internal

Associated Types

type Rep CommandIndex 
Instance details

Defined in Shrun.Command.Types.Internal

type Rep CommandIndex = D1 ('MetaData "CommandIndex" "Shrun.Command.Types.Internal" "shrun-0.10-inplace" 'True) (C1 ('MetaCons "MkCommandIndex" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCommandIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Positive Int))))
Show CommandIndex Source # 
Instance details

Defined in Shrun.Command.Types.Internal

Eq CommandIndex Source # 
Instance details

Defined in Shrun.Command.Types.Internal

Ord CommandIndex Source # 
Instance details

Defined in Shrun.Command.Types.Internal

Hashable CommandIndex Source # 
Instance details

Defined in Shrun.Command.Types.Internal

Pretty CommandIndex Source # 
Instance details

Defined in Shrun.Command.Types.Internal

(k ~ An_Iso, a ~ Positive Int, b ~ Positive Int) => LabelOptic "unCommandIndex" k CommandIndex CommandIndex a b Source # 
Instance details

Defined in Shrun.Command.Types.Internal

type Rep CommandIndex Source # 
Instance details

Defined in Shrun.Command.Types.Internal

type Rep CommandIndex = D1 ('MetaData "CommandIndex" "Shrun.Command.Types.Internal" "shrun-0.10-inplace" 'True) (C1 ('MetaCons "MkCommandIndex" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCommandIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Positive Int))))

range :: CommandIndex -> CommandIndex -> Either String (CommandIndex, NESeq CommandIndex) Source #

Given m, n s.t. m < n, returns [m .. n]. Notice this is strictly increasing.

joinRange :: (a, NESeq a) -> NESeq a Source #

Collapses range output back into a single NESeq.

Vertex

type Vertex = Int Source #

Type for Command graph vertex, for usage with fgl.

type LVertex a = (Vertex, a) Source #

Labeled Vertex.