Let's say you want to use your own show function (for example, let show = take 1000 . Prelude.show
). How can you allow ghci
to use that for printing instead of the built in show
?
You can define your own interactive print function e.g:
module BetterPrint
betterPrint a = putStrLn (take 1000 $ show a)
then start ghci as
ghci -interactive-print=BetterPrint.betterPrint
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With