Re: Determine instance method from class method callsite

2017-10-05 Thread Robin Palotai
About "Var" - that is just a Name with additional info, but happens in the typechecked tree (according to API docs). 2017-10-05 18:00 GMT+02:00 Simon Peyton Jones : > well the HsWrapper might have something much more complicated than a > DFunId. It might need to construct the dictionary for Eq [

Re: In C--: should CmmCall and CmmProc agree on their live registers?

2017-10-05 Thread Moritz Angermann
Hi Simon, no, I did not until now. Thank you! As such it is acceptable that the CmmCalls set of live registers is a superset of the CmmProcs live registers that is called. Say we shrink the set of live registers of the CmmProc, as we determine that some of the arguments passed in registers are

Deprecating STM invariant mechanism

2017-10-05 Thread Ben Gamari
tl;dr. Do you use Control.Monad.STM.always? If so say so on this [1] proposal otherwise the interface may be removed. Hello everyone, GHC's STM subsystem has long had the ability to run user-specified invariant checks when committing transactions, embodied by the Control.Monad.STM.always

RE: Determine instance method from class method callsite

2017-10-05 Thread Simon Peyton Jones via ghc-devs
well the HsWrapper might have something much more complicated than a DFunId. It might need to construct the dictionary for Eq [a] from the DFun for Eq [a] and a dictionary for Eq a. it would be easy to resolve the Var of the instance method. I don't know what "the var of the instance method" is

Re: Determine instance method from class method callsite

2017-10-05 Thread Robin Palotai
Hello Simon - I outlined the approach in https://github.com/google/haskell-indexer/issues/73. TLDR is 1) at callsite, indeed the HsWrapper needs to be analysed to get the instance DFunId 2) at instance declaration site, we need to again take note of the DFunId. It is slightly more complicated than

RE: In C--: should CmmCall and CmmProc agree on their live registers?

2017-10-05 Thread Simon Peyton Jones via ghc-devs
Did you ever get a reply to this? In the output of the codegen, CmmProcs should have no live registers apart from those used to pass args, and the standard ones. Simon | -Original Message- | From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Moritz | Angermann | Sent:

RE: Determine instance method from class method callsite

2017-10-05 Thread Simon Peyton Jones via ghc-devs
Did you get a reply? I’m not 100% certain of your question, but consider the bar = show for some expression e. In the input to the type type checker the syntax tree for the RHS will be something like HsApp (HsVar “show”) (The “show” isn’t really a string, it’s the Name for t