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

cabal new-repl: Pretty-print all GHCi output #92

Closed benjaminweb closed 3 years ago

benjaminweb commented 3 years ago

The README gives the instructions to pPrint GHCi output by default with stack. How is it done with cabal new-repl?

cabal new-repl --ghci-options "-interactive-print=Text.Pretty.Simple.pPrint" --package pretty-simple
cabal: unrecognized 'new-repl' option `--ghci-options'
unrecognized 'new-repl' option `-interactive-print=Text.Pretty.Simple.pPrint'
cdepillabout commented 3 years ago

@benjaminweb I don't actually use cabal very much, but it looks like cabal new-repl (or, well, now just cabal repl) has a flag --repl-options. I imagine this is the same as stack's --ghci-options.

I'd really appreciate if you could figure this out and send a PR updating the README. I'm sure that would be helpful for other people!

benjaminweb commented 3 years ago

cabal new-repl --repl-options "-interactive-print=Text.Pretty.Simple.pPrint" --package pretty-simple

does work for me. Will consider a PR.

On Mon, 21 Jun 2021, at 15:27, Dennis Gosnell wrote:

@benjaminweb https://github.com/benjaminweb I don't actually use cabal very much, but it looks like cabal new-repl (or, well, now just cabal repl) has a flag --repl-options. I imagine this is the same as stack's --ghci-options.

I'd really appreciate if you could figure this out and send a PR updating the README. I'm sure that would be helpful for other people!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cdepillabout/pretty-simple/issues/92#issuecomment-865032990, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ3EVPDCBYGBJPEX6XGPTTTT445DANCNFSM47BMQ3UQ.