cdepillabout / pretty-simple

pretty-printer for Haskell data types that have a Show instance
https://hackage.haskell.org/package/pretty-simple
BSD 3-Clause "New" or "Revised" License
243 stars 29 forks source link

outputOptionsPageWidth has no effect #126

Open simonmichael opened 1 year ago

simonmichael commented 1 year ago

I wanted to use outputOptionsCompact, but also to wrap lines when appropriate. outputOptionsPageWidth seems to have no effect.

ghci> pPrintOpt NoCheckColorTty defaultOutputOptionsNoColor{outputOptionsCompact=True, outputOptionsPageWidth=80} $ replicate 80 "a"
[ "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a"
]
georgefst commented 1 year ago

Huh, that is surprising. It definitely works in some cases: see the examples in the web app. I'm not sure what's special about this input.