mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-11-24 07:33:38 +03:00
Rename Lint.Fix.Result to Lint.Fix.FixResult
This is to avoid confusion with the core Result type when seeing signatures like `a : b -> Result`
This commit is contained in:
parent
86f3a24a52
commit
0d39bcf2d0
@ -1,7 +1,7 @@
|
||||
module Lint.Fix exposing
|
||||
( Fix
|
||||
, removeRange, replaceRangeBy, insertAt
|
||||
, Result(..), Problem(..), fix
|
||||
, FixResult(..), Problem(..), fix
|
||||
, mergeRanges, rangeUpUntil
|
||||
)
|
||||
|
||||
@ -20,7 +20,7 @@ module Lint.Fix exposing
|
||||
|
||||
# Applying fixes
|
||||
|
||||
@docs Result, Problem, fix
|
||||
@docs FixResult, Problem, fix
|
||||
|
||||
|
||||
# Range manipulation
|
||||
@ -77,9 +77,9 @@ insertAt =
|
||||
-- APPLYING FIXES
|
||||
|
||||
|
||||
{-| Represents the result of having applied a list of fixes
|
||||
{-| Represents the result of having applied a list of fixes to a source code.
|
||||
-}
|
||||
type Result
|
||||
type FixResult
|
||||
= Successful String
|
||||
| Errored Problem
|
||||
|
||||
@ -95,7 +95,7 @@ type Problem
|
||||
|
||||
{-| Apply the changes on the source code.
|
||||
-}
|
||||
fix : List Fix -> String -> Result
|
||||
fix : List Fix -> String -> FixResult
|
||||
fix fixes sourceCode =
|
||||
if containRangeCollisions fixes then
|
||||
Errored HasCollisionsInFixRanges
|
||||
|
Loading…
Reference in New Issue
Block a user