stil4m/elm-syntax/7.2.4

NOTE: the latest version is 7.3.9

Elm.Syntax.Range

Source Code Ranges

Types

type alias Range =
{ start : Location
, end : Location
}

Range for a piece of code with a start and end

type alias Location =
{ row : Int
, column : Int
}

Source location

Functions

emptyRange : Range

Construct an empty range

combine : List Range -> Range

Compute the largest area of a list of ranges.

Comparison

See also Basics.compare.

compare : Range -> Range -> Order

Compare the position of two Ranges.

compareLocations : Location -> Location -> Order

Compare two Locations.

Json

encode : Range -> Value

Encode a range

decoder : Decoder Range

Decode a range