HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulesimple-reflect-0.3.3Haskell98

Debug.SimpleReflect

Simple reflection of haskell expressions containing variables.

Some examples:

> sum [1..5] :: Expr
0 + 1 + 2 + 3 + 4 + 5
> foldr1 f [a,b,c]
f a (f b c)
> take 5 (iterate f x)
[x,f x,f (f x),f (f (f x)),f (f (f (f x)))]
> mapM_ print $ reduction (1+2*(3+4))
1 + 2 * (3 + 4)
1 + 2 * 7
1 + 14
15