loc-test-0.1.3.2: Test-related utilities related to the /loc/ package.

Safe HaskellNone
LanguageHaskell2010

Test.Loc.Hedgehog.Gen

Contents

Description

Hedgehog generators for types defined in the loc package.

Synopsis

Line

line Source #

Arguments

:: Bounds Line

Minimum and maximum line number

-> Gen Line 

line a b generates a line number on the linear range a to b.

line' :: Gen Line Source #

Generates a line number within the default bounds (1, defMaxLine).

defMaxLine :: Line Source #

The default maximum line: 99.

Column

column Source #

Arguments

:: Bounds Column

Minimum and maximum column number

-> Gen Column 

column a b generates a column number on the linear range a to b.

column' :: Gen Column Source #

Generates a column number within the default bounds (1, defMaxColumn).

defMaxColumn :: Column Source #

The default maximum column number: 99.

Loc

loc Source #

Arguments

:: Bounds Line

Minimum and maximum line number

-> Bounds Column

Minimum and maximum column number

-> Gen Loc 

loc lineBounds columnBounds generates a Loc with the line number bounded by lineBounds and column number bounded by columnBounds.

loc' :: Gen Loc Source #

Generates a Loc within the default line and column bounds.

Span

span Source #

Arguments

:: Bounds Line

Minimum and maximum line number

-> Bounds Column

Minimum and maximum column number

-> Gen Span 

span lineBounds columnBounds generates a Span with start and end positions whose line numbers are bounded by lineBounds and whose column numbers are bounded by columnBounds.

span' :: Gen Span Source #

Generates a Span with start and end positions within the default line and column bounds.

Area

area Source #

Arguments

:: Bounds Line

Minimum and maximum line number

-> Bounds Column

Minimum and maximum column number

-> Gen Area 

area lineBounds columnBounds generates an Area consisting of Spans with start and end positions whose line numbers are bounded by lineBounds and whose column numbers are bounded by columnBounds.

area' :: Gen Area Source #

Generates an Area consisting of Spans with start and end positions within the default line and column bounds.

Generator bounds

type Bounds a = (a, a) Source #

Inclusive lower and upper bounds on a range.

boundsSize :: Num n => (n, n) -> n Source #

The size of a range specified by Bounds.

Assumes the upper bound is at least the lower bound.