stil4m/elm-syntax/2.0.0

NOTE: this package is not compatible with Elm 0.19.1

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 smallest area of a list of ranges.

Json

encode : Range -> Value

Encode a range

decode : Decoder Range

Decode a range