HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulehxt-9.3.1.22Haskell2010

Text.XML.HXT.DTDValidation.XmlRE

A module for regular expression matching, adapted for XML DTDs.

This module is based on the module RE.

  • 1 type
  • 12 values
  • Packagehxt-9.3.1.22
  • Exports13
  • LanguageHaskell2010
  • LicenceMIT
  • SourceXmlRE.hs
datadata RE a
#

Data type for regular expressions.

Instances3Eq, Ord, Show
  • Eq a => Eq (RE a)Defined in hxt-9.3.1.22 · Text.XML.HXT.DTDValidation.RE
  • Ord a => Ord (RE a)Defined in hxt-9.3.1.22 · Text.XML.HXT.DTDValidation.RE
  • Show a => Show (RE a)Defined in hxt-9.3.1.22 · Text.XML.HXT.DTDValidation.RE
valuecheckRE :: (Eq a, Show a) => RE a -> String
#

Checks if an input matched a regular expression. The function should be called after matches.

Was the sentence used in matches in the language of the regular expression? -> matches e s == s in L(e)?

  • 1.parameter re : the derived regular expression

  • returns : empty String if input matched the regular expression, otherwise an error message is returned

valuematches :: RE String -> XmlTrees -> RE String
#

Derives a regular expression with respect to a list of elements.

  • 1.parameter re : regular expression

  • 2.parameter list : list of elements to which the regular expression is applied

  • returns : the derived regular expression

valueprintRE :: (Eq a, Show a) => RE a -> String
#

Constructs a string representation of a regular expression.

  • 1.parameter re : a regular expression

  • returns : the string representation of the regular expression

valuere_unit :: RE a
#

Constructs a regular expression for an empty sequence.

  • returns : regular expression for an empty sequence

valuere_zero :: String -> RE a
#

Constructs a regular expression for an empty set.

  • 1.parameter errMsg : error message

  • returns : regular expression for an empty set

valuere_sym :: a -> RE a
#

Constructs a regular expression for accepting a symbol

  • 1.parameter sym : the symbol to be accepted

  • returns : regular expression for accepting a symbol

valuere_rep :: RE a -> RE a
#

Constructs an optional repetition (*) of a regular expression

  • 1.parameter re_a : regular expression to be repeted

  • returns : new regular expression

valuere_plus :: RE a -> RE a
#

Constructs a repetition (+) of a regular expression

  • 1.parameter re_a : regular expression to be repeted

  • returns : new regular expression

valuere_opt :: Ord a => RE a -> RE a
#

Constructs an option (?) of a regular expression

  • 1.parameter re_a : regular expression to be optional

  • returns : new regular expression

valuere_seq :: RE a -> RE a -> RE a
#

Constructs a sequence (,) of two regular expressions

  • 1.parameter re_a : first regular expression in sequence

  • 2.parameter re_b : second regular expression in sequence

  • returns : new regular expression

valuere_alt :: Ord a => RE a -> RE a -> RE a
#

Constructs an alternative (|) of two regular expressions

  • 1.parameter re_a : first regular expression of alternative

  • 2.parameter re_b : second regular expression of alternative

  • returns : new regular expression

valuere_dot :: RE a
#

Constructs a regular expression for accepting any singel symbol

  • returns : regular expression for accepting any singel symbol