ormolu-0.1.2.0: A formatter for Haskell source code

Safe HaskellNone
LanguageHaskell2010

Ormolu.Diff

Description

Diffing GHC ASTs modulo span positions.

Synopsis

Documentation

data Diff Source #

Result of comparing two ParseResults.

Constructors

Same

Two parse results are the same

Different [SrcSpan]

Two parse results differ

Instances
Semigroup Diff Source # 
Instance details

Defined in Ormolu.Diff

Methods

(<>) :: Diff -> Diff -> Diff #

sconcat :: NonEmpty Diff -> Diff #

stimes :: Integral b => b -> Diff -> Diff #

Monoid Diff Source # 
Instance details

Defined in Ormolu.Diff

Methods

mempty :: Diff #

mappend :: Diff -> Diff -> Diff #

mconcat :: [Diff] -> Diff #

diffText Source #

Arguments

:: Text

Text before

-> Text

Text after

-> FilePath

Path to use to construct SrcLoc

-> Maybe (RealSrcLoc, Text, Text) 

Diff two texts and return the location they start to differ, alongside with excerpts around that location.