dhall-1.42.1: A configuration language guaranteed to terminate

Safe Haskell | Safe-Inferred
Language | Haskell2010

Dhall.Diff

Contents

- Diff

Description

This module provides functionality for concisely displaying the difference between two expressions

For example, this is used in type errors to explain why the actual type does not match the expected type

Synopsis

- data Diff = Diff {
  - same :: Bool
  - doc :: Doc Ann
  }
- diffNormalized :: (Eq a, Pretty a) => Expr s a -> Expr s a -> Diff
- diff :: (Eq a, Pretty a) => Expr Void a -> Expr Void a -> Diff

# Diff

data Diff Source #

This type is a `Doc` enriched with a `same` flag to efficiently track if any difference was detected

Constructors

Diff |

Fields

- same :: Bool
- doc :: Doc Ann

#### Instances

Instances details

IsString Diff Source # |
Instance details Defined in Dhall.Diff Methods fromString :: String -> Diff Source #
Monoid Diff Source # |
Instance details Defined in Dhall.Diff Methods mempty :: Diff Source # mappend :: Diff -> Diff -> Diff Source # mconcat :: [Diff] -> Diff Source #
Semigroup Diff Source # |
Instance details Defined in Dhall.Diff Methods (<>) :: Diff -> Diff -> Diff Source # sconcat :: NonEmpty Diff -> Diff Source # stimes :: Integral b => b -> Diff -> Diff Source #

diffNormalized :: (Eq a, Pretty a) => Expr s a -> Expr s a -> Diff Source #

Render the difference between the normal form of two expressions

diff :: (Eq a, Pretty a) => Expr Void a -> Expr Void a -> Diff Source #

Render the difference between two expressions