doctest-support
CopyrightCopyright 2024 Ruifeng Xie
LicenseLGPL-3.0-or-later
MaintainerRuifeng Xie <ruifengx@outlook.com>
Safe HaskellSafe-Inferred
LanguageGHC2021

Test.DocTest.FuzzySyntax

Description

Fuzzy pattern syntax used for doctest output text segments.

Synopsis

Documentation

type Pattern = [Segment] Source #

Pattern string.

data Segment Source #

Pattern segment.

Constructors

BlankLine

"<BLANKLINE>" for empty lines.

MultilineDots

"..." on its own line, matching one or more arbitrary lines.

InlineDots

"..." in the middle of line, matching one or more non-newline characters.

Plain String

Other plain string, matched verbatim.

Instances

Instances details
Show Segment Source # 
Instance details

Defined in Test.DocTest.FuzzySyntax

Eq Segment Source # 
Instance details

Defined in Test.DocTest.FuzzySyntax

Methods

(==) :: Segment -> Segment -> Bool #

(/=) :: Segment -> Segment -> Bool #

parsePattern :: String -> Pattern Source #

Parsing the pattern string into a Pattern structure.