    {-# LANGUAGE DeriveGeneric #-}
    -- | @since 1.0

    module Test.Tasty.Patterns.Types where

    import GHC.Generics

    -- | @since 1.0
    data Expr
      = IntLit !Int
      | NF -- ^ number of fields
      | Add Expr Expr
      | Sub Expr Expr
      | Neg Expr
      | Not Expr
      | And Expr Expr
      | LT Expr Expr
      | GT Expr Expr
      | LE Expr Expr
      | GE Expr Expr
      | EQ Expr Expr
      | NE Expr Expr
      | Or Expr Expr
      | Concat Expr Expr
      | Match Expr String
      | NoMatch Expr String
      | Field Expr -- ^ nth field of the path, where 1 is the outermost group name and 0 is the whole test name, using @.@ (dot) as a separator
      | StringLit String
      | If Expr Expr Expr
      | ERE String -- ^ an ERE token by itself, like @/foo/@ but not like @$1 ~ /foo/@
      | ToUpperFn Expr
      | ToLowerFn Expr
      | LengthFn (Maybe Expr)
      | MatchFn Expr String
      | SubstrFn Expr Expr (Maybe Expr)
      deriving
      ( Int -> Expr -> ShowS
    [Expr] -> ShowS
    Expr -> String
    (Int -> Expr -> ShowS)
    -> (Expr -> String) -> ([Expr] -> ShowS) -> Show Expr
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Expr -> ShowS
    showsPrec :: Int -> Expr -> ShowS
    $cshow :: Expr -> String
    show :: Expr -> String
    $cshowList :: [Expr] -> ShowS
    showList :: [Expr] -> ShowS
    Show
      , Expr -> Expr -> Bool
    (Expr -> Expr -> Bool) -> (Expr -> Expr -> Bool) -> Eq Expr
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Expr -> Expr -> Bool
    == :: Expr -> Expr -> Bool
    $c/= :: Expr -> Expr -> Bool
    /= :: Expr -> Expr -> Bool
    Eq      -- ^ @since 1.1
      , (forall x. Expr -> Rep Expr x)
    -> (forall x. Rep Expr x -> Expr) -> Generic Expr
    forall x. Rep Expr x -> Expr
    forall x. Expr -> Rep Expr x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Expr -> Rep Expr x
    from :: forall x. Expr -> Rep Expr x
    $cto :: forall x. Rep Expr x -> Expr
    to :: forall x. Rep Expr x -> Expr
    Generic -- ^ @since 1.4.2
      )