RE: Determine instance method from class method callsite

2017-10-20 Thread Simon Peyton Jones via ghc-devs
ghc-devs | Sent: 19 October 2017 18:13 | To: ghc-devs@haskell.org | Subject: Re: Determine instance method from class method callsite | | I have the same problem with a compiler plugin that I am writing. | | In GHC Core I need to get from a dict-fun identifier (e.g. | $fMyClassDouble

Re: Determine instance method from class method callsite

2017-10-19 Thread Tillmann Vogt via ghc-devs
I have the same problem with a compiler plugin that I am writing. In GHC Core I need to get from a dict-fun identifier (e.g. $fMyClassDouble to the type class instance bindr (starting with $c). lookupInstEnv from the InstEnv module seemed to do it, but it seems to look up the matching key

Re: Determine instance method from class method callsite

2017-10-05 Thread Robin Palotai
nt. maybe others can help? > > > > Simon > > > > *From:* Robin Palotai [mailto:palotai.ro...@gmail.com] > *Sent:* 05 October 2017 11:17 > *To:* Simon Peyton Jones <simo...@microsoft.com> > *Cc:* GHC developers <ghc-devs@haskell.org>; haskell < > has

RE: Determine instance method from class method callsite

2017-10-05 Thread Simon Peyton Jones via ghc-devs
ptember 2017 06:39 To: GHC developers <ghc-devs@haskell.org<mailto:ghc-devs@haskell.org>>; haskell <haskell-c...@haskell.org<mailto:haskell-c...@haskell.org>> Subject: Determine instance method from class method callsite Sorry, I messed up subject and mailing list. Cop

Re: Determine instance method from class method callsite

2017-10-05 Thread Robin Palotai
gt; > > Simon > > *From:* ghc-devs [mailto:ghc-devs-boun...@haskell.org] *On Behalf Of *Robin > Palotai > *Sent:* 19 September 2017 06:39 > *To:* GHC developers <ghc-devs@haskell.org>; haskell < > haskell-c...@haskell.org> > *Subject:* Determine instance meth

RE: Determine instance method from class method callsite

2017-10-05 Thread Simon Peyton Jones via ghc-devs
Email is quickly lost. Simon From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Robin Palotai Sent: 19 September 2017 06:39 To: GHC developers <ghc-devs@haskell.org>; haskell <haskell-c...@haskell.org> Subject: Determine instance method from class method callsite Sorry, I

Re: Determine instance method from class method callsite

2017-09-21 Thread Robin Palotai
My conclusion so far: there's no royal way. One can get the instance dictionary DFunId pretty easy, but then access to the Typechecked AST of the instance declaration is really needed to find all the method bindings $c... (that get applied when constructing the dictionary $d...). 2017-09-19 7:38

Determine instance method from class method callsite

2017-09-18 Thread Robin Palotai
Sorry, I messed up subject and mailing list. Copying to both list now after the mistake (wanted only ghc-devs for specificity). Thanks! 2017-09-19 7:36 GMT+02:00 Robin Palotai : > Hello GHC devs, > > Before inventing the wheel, want to check if there is a GHC API way to