HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduletexmath-0.13.3.1Haskell2010

Text.TeXMath.Shared

Synopsis
  • Packagetexmath-0.13.3.1
  • Exports22
  • LanguageHaskell2010
  • LicenceGPL-2.0-only
  • SourceShared.hs
valuefixTree :: Exp -> Exp

Walks over a tree of expressions, removing empty expressions, and fixing delimited expressions with no delimiters and unnecessarily grouped expressions.

valueeverywhereExp :: (Exp -> Exp) -> Exp -> Exp

Apply a transformation to every subexpression, bottom up (equivalent to SYB's everywhere (mkT f), but faster, since it involves no run-time type checks).

valueeverywhereExpList :: ([Exp] -> [Exp]) -> [Exp] -> [Exp]

Apply a transformation to every expression list in an expression list, bottom up. Like SYB's everywhere (mkT f), this applies the function to every tail of every list (right to left), since each tail is itself a [Exp] node; a rewrite can thus consume already-rewritten material to its right.

valuemapExpChildren :: (Exp -> Exp) -> ([Exp] -> [Exp]) -> Exp -> Exp

Apply goE to each immediate subexpression of a node and goL to each immediate subexpression list. A building block for expression traversals.