You want -fno-print-bind-results, which can be passed to ghci at the command line or set within ghci using :set.
I found your answer in this guide:
http://www.haskell.org/ghc/docs/latest/html/users_guide/interactive-evaluation.html
- Phil
Hi everyone,
When evaluating an IO monad in GHCi from the 6.6.1 distribution, the
REPL tries to be a bit too smart about printing out the returned
value. For example, () values are not printed:
Prelude System.Directory> setCurrentDirectory "work"
Prelude System.Directory>
...but String, or, as far as I can see, any other values, do get printed:
Prelude System.Directory> getCurrentDirectory
"/home/shinobi"
Prelude System.Directory> set
In my particular case, the value printed is a 250,000-element list --
waiting for the value to print out is not an option. I don't want to
see the whole list at once, but do need to examine parts of it,
subject it to intermediate transformations, etc.
Is there any way to suppress this output and revert to the old
behavior, where the value was simply bound to "it", without being
printed?
Thanks,
D. Tenev
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users