[GHC] #8642: Allow GHCi to print non-pretty forms of things.

#8642: Allow GHCi to print non-pretty forms of things. ------------------------------------+------------------------------------- Reporter: Fuuzetsu | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- Currently when we ask GHCi for :info or :type of something, it will do things like splitting over multiple lines and all that eye candy that people like to see. This however makes it more difficult for people to write text editor plugins &c that rely on GHCi output. Currently one has to write parsers to stitch the GHCi output back together which is fairly error prone and not really future-proof. Is there any chance for a more machine-friendly output? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8642 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8642: Allow GHCi to print non-pretty forms of things. -------------------------------------+------------------------------------ Reporter: Fuuzetsu | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by nomeata): Shoudn’t you use the GHC API then? Parsing output meant for human consumption has a certain smell of abuse. It would be great if one can run arbitrary `GhciMonad` actions from the interpreter prompt. Dennis Felsing has started some work in that direction, see http://www.haskell.org/pipermail/glasgow-haskell- users/2012-December/023161.html for pointers. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8642#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8642: Allow GHCi to print non-pretty forms of things. -------------------------------------+------------------------------------ Reporter: Fuuzetsu | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by hvr): Btw, line-breaking of compiler message can be suppressed somewhat by using `-dppr-cols999`, however that doesn't seem to apply to the pretty-printing of `:info` or `:type`. However, the major parsing/interaction issue I have encountered while working on the Emacs integration is the shared I/O on stdin/stdout between GHCi's and the interpreted/evaluated code output (interleaved output on STDOUT, as well as code trying to read from STDIN). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8642#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8642: Allow GHCi to print non-pretty forms of things. -------------------------------------+------------------------------------ Reporter: Fuuzetsu | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Fuuzetsu): nomeata: Yes, perhaps, but it's often difficult to do so from an environment that doesn't have the ability to use Haskell libs, like most editors don't. Even ghc-mod spits out the type information in this pretty format. It's also a bit more difficult to wrestle with GHC API rather than just sending ‘:i’ to already running and loaded GHCi. If you feel that this is not something GHCi should do then by all means, please close the ticket! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8642#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8642: Allow GHCi to print non-pretty forms of things. -------------------------------------+------------------------------------- Reporter: Fuuzetsu | Owner: Type: feature | Status: new request | Milestone: Priority: normal | Version: 7.9 Component: GHCi | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by Fuuzetsu): * version: 7.7 => 7.9 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8642#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8642: Allow GHCi to print non-pretty forms of things. -------------------------------------+------------------------------------- Reporter: Fuuzetsu | Owner: (none) Type: feature request | Status: closed Priority: normal | Milestone: Component: GHCi | Version: 7.9 Resolution: wontfix | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Fuuzetsu): * status: new => closed * resolution: => wontfix Comment: I don't really need this anymore and it was questionable in first place so I'm just closong as wontfix rather than lettin it sit around indefinitely. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8642#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC