[GHC] #10874: Implement `:type-at`, `:all-types`, `:loc-at` in GHCi
#10874: Implement `:type-at`, `:all-types`, `:loc-at` in GHCi -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature | Status: new request | Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- We missed the opportunity to merge this for GHC 7.10 but I hope this can make it for GHC 8.0 See https://github.com/chrisdone/ghci-ng/blob/master/README.md for a description of the new GHCi commands I've started rebasing the changes from Chris' ghci-ng repo against GHC HEAD and pushed the work-in-progress state as branch `wip/T10874`. One blocker right now is the use of SYB to traverse the AST which I don't want to drag into GHC as a dependency. So one thing that needs to be done is rewrite those 20 lines of code without relying on SYB. Other than that some minor polishing needs to be done. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10874> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10874: Implement `:type-at`, `:all-types`, `:loc-at` in GHCi -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1240 -------------------------------------+------------------------------------- Changes (by hvr): * status: new => patch * differential: => Phab:D1240 Old description:
We missed the opportunity to merge this for GHC 7.10 but I hope this can make it for GHC 8.0
See https://github.com/chrisdone/ghci-ng/blob/master/README.md for a description of the new GHCi commands
I've started rebasing the changes from Chris' ghci-ng repo against GHC HEAD and pushed the work-in-progress state as branch `wip/T10874`.
One blocker right now is the use of SYB to traverse the AST which I don't want to drag into GHC as a dependency. So one thing that needs to be done is rewrite those 20 lines of code without relying on SYB.
Other than that some minor polishing needs to be done.
New description: We missed the opportunity to merge this for GHC 7.10 but I hope this can make it for GHC 8.0 See https://github.com/chrisdone/ghci-ng/blob/master/README.md for a description of the new GHCi commands -- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10874#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10874: Implement `:type-at`, `:all-types`, `:loc-at` in GHCi -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1240 -------------------------------------+------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:"2f6e87a494330837c425dab67ba26ee36bd9eacf/ghc" 2f6e87a4/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="2f6e87a494330837c425dab67ba26ee36bd9eacf" Introduce HasGhciState class and refactor use-sites This allows to reach the GhciState without having to keep track how many Monad transformer layers sit on top of the GHCi monad. While at it, this also refactors code to make more use of the existing `modifyGHCiState` operation. This is a preparatory refactoring for #10874 Differential Revision: https://phabricator.haskell.org/D1582 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10874#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10874: Implement `:type-at`, `:all-types`, `:loc-at` in GHCi -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1240 -------------------------------------+------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:"fd3b845c01aa26b6e5cd12c00af59e5468e21b1b/ghc" fd3b845c/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="fd3b845c01aa26b6e5cd12c00af59e5468e21b1b" Make HasDynFlags more transformers friendly Ideally, we'd have the more general instance (MonadTrans t, Monad m, HasDynFlags m) => HasDynFlags (t m) where getDynFlags = lift getDynFlags definition. However, that one would overlap with the `HasDynFlags (GhcT m)` instance. Instead we define instances for a couple of common Monad transformers explicitly in order to avoid nasty overlapping instances. This is a preparatory refactoring for #10874 Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1581 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10874#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10874: Implement `:type-at`, `:all-types`, `:loc-at` in GHCi -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1240 -------------------------------------+------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:"7997d6c0f0ba4560dab799cd87850917e0df5e2f/ghc" 7997d6c0/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="7997d6c0f0ba4560dab799cd87850917e0df5e2f" Refactor GHCi Command type; allow "hidden" commands This transforms the 'Command' tuple into a record which is easier to extend. While at it, this refactoring turns the IDE `:complete` into a hidden command excluded from completion. The next obvious step is to add a summary text field for constructing the `:help` output (as well as allowing to get `:help <CMD>` for single commands. This is a preparatory refactoring for D1240 / #10874 Reviewed By: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1590 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10874#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10874: Implement `:type-at`, `:all-types`, `:loc-at` in GHCi -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1240 -------------------------------------+------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:"dd56eb1efc11bcbd60ab0b77ca3e4f949d7d0844/ghc" dd56eb1e/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="dd56eb1efc11bcbd60ab0b77ca3e4f949d7d0844" Merge new commands from ghci-ng (re #10874) This adds the new commands `:all-types`, `:loc-at`, `:type-at`, and `:uses` designed for editor-integration (such as Emacs' `haskell-mode`). This was originally implemented by Chris Done on https://github.com/chrisdone/ghci-ng and has been in use by Emacs' `haskell-mode` for over a year already, and closely missed the GHC 7.10 release back then. I've squashed the commits, rebased to GHC HEAD, and heavily refactored and improved the patch. Tests will be added in a separate commit. Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1240 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10874#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10874: Implement `:type-at`, `:all-types`, `:loc-at` in GHCi -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: closed Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1240 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10874#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC