[Haskell-cafe] How can I use ghci more wisely?
mgsloan at gmail.com
Wed Jul 24 10:41:13 CEST 2013
This portion of haskell-mode (haskell-interactive-mode-eval-pretty) is what
the UI for something like this could look like:
This isn't an answer to your question, though, because expanding subparts
of the output doesn't drive evaluation. It would be very cool, and quite
possible, to have a variant of the Show typeclass that had output with such
Another non-answer is to take a look at using vaccum and
vaccum-graphviz together, to get an idea of the heap structure of
unforced values. I've made a gist demonstrating how to use these to
visualize the heap without forcing values. This doesn't show any
concrete values (as that would require some serious voodoo), but does show
how the heap changes due to thunks being forced.
On Tue, Jul 23, 2013 at 7:30 PM, yi lu <zhiwudazhanjiangshi at gmail.com>wrote:
> I am wondering how can I ask ghci to show an infinite list wisely.
> When I type
> *fst ([1..],[1..10])*
> The result is what as you may guess
> *1,2,3,4,...*(continues to show, cut now)
> How could I may ghci show
> this wise way not the long long long list itself?
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe