One day, I _really_ should learn all GHCI commands...
Thanks, Felipe ^^
2012/1/25 Felipe Almeida Lessa felipe.le...@gmail.com
On Wed, Jan 25, 2012 at 7:38 PM, Yves Parès yves.pa...@gmail.com wrote:
But I haven't found a way to tell GHCI to fully evaluate 'x' but _not_
print
its value.
Thanks!
I released it:
http://hackage.haskell.org/package/htrace
http://github.com/jkff/htrace
On Wed, Jan 25, 2012 at 4:18 AM, Felipe Almeida Lessa
felipe.le...@gmail.com wrote:
Really nice! Looks like it could be a useful mini-package on Hackage.
--
Felipe.
--
Eugene Kirpichov
Look how one can watch the evaluation tree of a computation, to debug
laziness-related problems.
You might like the old Hood/GHood:
http://hackage.haskell.org/package/hood
http://hackage.haskell.org/package/GHood
Background info/papers:
http://www.ittc.ku.edu/csdl/fpg/Tools/Hood
Hi, nice little package!
I just made a fork and added a new function makeHTrace to be able to have
separate variables 'level'.
I also add the htrace type signature (or else haddock won't generate
documentation for this module):
https://github.com/YwenP/htrace
I was also investigating in a way to
On Wed, Jan 25, 2012 at 7:38 PM, Yves Parès yves.pa...@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
Hi cafe,
Look how one can watch the evaluation tree of a computation, to debug
laziness-related problems.
{-# LANGUAGE BangPatterns #-}
module HTrace where
import Data.List (foldl')
import Data.IORef
import System.IO.Unsafe
level = unsafePerformIO $ newIORef 0
htrace str x = unsafePerformIO $
Great, It illustrates why difference lists are awesome.
import HTrace
app :: [a] - [a] - [a]
app [] ys = htrace app ys
app (x:xs) ys = htrace app (x:app xs ys)
rev1 [] = htrace [] []
rev1 (x:xs) = htrace rev1 (app (rev1 xs) [x])
rev2 [] ys = htrace ys ys
rev2 (x:xs) ys = htrace : (rev2 xs
Really nice! Looks like it could be a useful mini-package on Hackage.
--
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe