lerzegov/elm-syntax-fork/1.1.0

Elm.Syntax.Range

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

empty : 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.

Serialization

encode : Range -> Value

Encode a range

decoder : Decoder Range

Decode a range

Deprecated

emptyRange : Range

@deprecated Use empty instead. It does the same thing but the name is more Elm-y.

Construct an empty range