[GHC] #9394: Show data/type family instances with ghci's :info command
GHC
ghc-devs at haskell.org
Sat Aug 2 17:58:41 UTC 2014
#9394: Show data/type family instances with ghci's :info command
-------------------------------------+-------------------------------------
Reporter: s9gf4ult | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 7.6.3
Keywords: ghci | Operating System:
Architecture: Unknown/Multiple | Unknown/Multiple
Difficulty: Unknown | Type of failure:
Blocked By: | None/Unknown
Related Tickets: | Test Case:
| Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
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:
{{{#!hs
*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:
{{{#!hs
*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`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9394>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list