[Haskell-cafe] Hierarchical tracing for debugging laziness

Felipe Almeida Lessa felipe.lessa at gmail.com
Wed Jan 25 23:04:53 CET 2012


On Wed, Jan 25, 2012 at 7:38 PM, Yves Parès <yves.pares at gmail.com> wrote:
> But I haven't found a way to tell GHCI to fully evaluate 'x' but _not_ print
> its value.

Use the :force, Yves!

> let {a = htrace "a" 12; b = htrace "b" 29; c = htrace "c" 10; d = htrace "d" 90; x = htrace "," (htrace "+" (a+b), htrace "*" (c*d)) }
> :force x
,
+
  a
  b
*
  c
  d
x = (41,900)

Cheers! =)

-- 
Felipe.



More information about the Haskell-Cafe mailing list