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

Modulerere-0.2.0.2Haskell2010

RERE.Examples.JSON

JSON grammar example.

  • 1 type
  • 4 values
  • Packagerere-0.2.0.2
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceJSON.hs
Example1 expression
import RERE
valuejsonRE' :: RE Void
#

JSON recursive regular expression constructor from jsonCFG.

jsonRE' = compact (cfgToRE jsonNames jsonCFG)

The conversion doesn't optimize the resulting regular expression, but is relatively fast.

Example1 expression
size (cfgToRE jsonNames jsonCFG)232

jsonRE is pre-calculated variant.

Example1 expression
size jsonRE205
valuejsonRE :: RE Void
#

Pre-calculated JSON grammar as regular expression.

Example1 expression
size jsonRE205

See jsonRE' for one constructed from jsonCFG.