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

Modulesimple-reflect-0.3.3Haskell98

Debug.SimpleReflect.Expr

Simple reflection of haskell expressions containing variables.

  • 2 types
  • 1 class
  • 6 values

Construction

6 declarations
datadata Expr
#

A reflected expression

Instances13Bounded, Enum, Eq, Floating, Fractional, Integral, …
  • Bounded ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
  • Enum ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
  • Eq ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
  • Floating ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
  • Fractional ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
  • Integral ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
  • Num ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
  • Ord ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
  • Real ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
  • Show ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
  • Semigroup ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
  • Monoid ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
  • FromExpr ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
classclass FromExpr a where
#

Conversion from Expr to other types

Methods

Instances2FromExpr
  • FromExpr ExprDefined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr
  • (Show a, FromExpr b) => FromExpr (a -> b)Defined in simple-reflect-0.3.3 · Debug.SimpleReflect.Expr

Evaluating

3 declarations
valueexpr :: Expr -> Expr
#

Force something to be an expression.

valuereduce :: Expr -> Expr
#

Reduce (evaluate) an expression once.

For example reduce (1 + 2 + 3 + 4) == 3 + 3 + 4

valuereduction :: Expr -> [Expr]
#

Show all reduction steps when evaluating an expression.