2016-02-24 16 views

Trả lời

11

Bạn có thể định nghĩa của riêng bạn interactive print chức năng ví dụ:

module BetterPrint 
betterPrint a = putStrLn (take 1000 $ show a) 

sau đó bắt đầu ghci như

ghci -interactive-print=BetterPrint.betterPrint 
+0

Protip: gán 'ghci - interactive-print = BetterPrint.betterPrint' vào một bí danh. – PyRulez

+0

Bạn cũng có thể đặt số này vào ~/.ghci ': set -interactive-print = betterPrint' – pyrospade

Các vấn đề liên quan