Show data/type family instances with ghci's :info command
Current version of ghci (7.6.3) does not show data instances. For example, I have some Yesod application and I want to see all data constructors of (Route App) data family instance:
*Application> :info Route App
class Eq
(Route
a) => yesod-routes-1.2.0.6:Yesod.Routes.Class.RenderRoute a where
data family Route a1
...
-- Defined in `yesod-routes-1.2.0.6:Yesod.Routes.Class'
instance Eq (Route App) -- Defined at Foundation.hs:48:1
instance Read (Route App) -- Defined at Foundation.hs:48:1
.................
It just shows info about Route
, then info about App
separately. When I try this:
*Application> :info (Route App)
<interactive>:1:2: parse error on input `Route'
I am getting parse error.
I offer to use this syntax (with parentheses) to show info about instance of data/type family, namely, data constructors and such stuff, just like for ordinal data
.
Trac metadata
Trac field | Value |
---|---|
Version | 7.6.3 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | hvr |
Operating system | |
Architecture |