[GHC] #12895: Lookup rules associated with functions/values in GHCI
GHC
ghc-devs at haskell.org
Thu Dec 1 03:58:05 UTC 2016
#12895: Lookup rules associated with functions/values in GHCI
-------------------------------------+-------------------------------------
Reporter: harpocrates | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 8.0.1
Resolution: | 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: |
-------------------------------------+-------------------------------------
Comment (by harpocrates):
Replying to [comment:1 simonpj]:
> I can see the value, and I don't think it'd be hard. Happy to advise.
>
> First look at how `:info` works, I suggest.
>
> Simon
After a quick survey of how `:info` works, I think I'm starting to see
what needs to be done (or getting lost). As `:info` does for finding
instances, I'll need to start by loading some interfaces to make sure I
really do find all my `RULES`, then I should be able to get out of the
`ExternalPackageState` a `RuleBase`, at which point I just need to filter
for the right `CoreRule`s .
However, is `CoreRule` really the abstraction I'm looking for? I noticed
there is also an interface level `IfaceRule` and a type checker level
`LRuleDecl Id` (from `TcGblEnv`) so I thought I'd ask...
More generally, how little of this sounds right? :)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12895#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list