    {-# LANGUAGE OverloadedStrings #-}

    -- | Common definitions for pre- and post- processing.
    module Ormolu.Processing.Common
      ( OrmoluState (..),
        startDisabling,
        endDisabling,
      )
    where

    import Data.String (IsString (..))

    -- | Ormolu state.
    data OrmoluState
      = -- | Enabled
        OrmoluEnabled
      | -- | Disabled
        OrmoluDisabled
      deriving (OrmoluState -> OrmoluState -> Bool
    (OrmoluState -> OrmoluState -> Bool)
    -> (OrmoluState -> OrmoluState -> Bool) -> Eq OrmoluState
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: OrmoluState -> OrmoluState -> Bool
    $c/= :: OrmoluState -> OrmoluState -> Bool
    == :: OrmoluState -> OrmoluState -> Bool
    $c== :: OrmoluState -> OrmoluState -> Bool
    Eq, Int -> OrmoluState -> ShowS
    [OrmoluState] -> ShowS
    OrmoluState -> String
    (Int -> OrmoluState -> ShowS)
    -> (OrmoluState -> String)
    -> ([OrmoluState] -> ShowS)
    -> Show OrmoluState
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [OrmoluState] -> ShowS
    $cshowList :: [OrmoluState] -> ShowS
    show :: OrmoluState -> String
    $cshow :: OrmoluState -> String
    showsPrec :: Int -> OrmoluState -> ShowS
    $cshowsPrec :: Int -> OrmoluState -> ShowS
    Show)

    -- | Marker for the beginning of the region where Ormolu should be disabled.
    startDisabling :: IsString s => s
    startDisabling :: s
    startDisabling = "{- ORMOLU_DISABLE_START"

    -- | Marker for the end of the region where Ormolu should be disabled.
    endDisabling :: IsString s => s
    endDisabling :: s
    endDisabling = "ORMOLU_DISABLE_END -}"