Skip to content

Commit

Permalink
ghc-dump-utils: Infinite line width in list-bindings output
Browse files Browse the repository at this point in the history
  • Loading branch information
bgamari committed Mar 4, 2021
1 parent 332c211 commit f0063ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ghc-dump-util/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Data.Maybe
import Data.List (sortBy)
import Data.Monoid
import Data.Ord
import System.IO (stdout)

import Options.Applicative
import Prettyprinter as PP
Expand Down Expand Up @@ -109,7 +110,8 @@ modes = subparser
, Col 6 "Coerc." (pretty . csCoercions . getStats)
, Col 3000 "Type" (pprType opts . binderType . unBndr . getBinder)
]
print $ renderTable table (sortBindings $ moduleBindings dump)
let layoutOpts = PP.defaultLayoutOptions { layoutPageWidth = Unbounded }
PP.renderIO stdout $ PP.layoutPretty layoutOpts $ renderTable table (sortBindings $ moduleBindings dump)

summarizeMode =
run <$> some dumpFile
Expand Down

0 comments on commit f0063ff

Please sign in to comment.