[Haskell-cafe] Getting types inside a function in ghci
amindfv at gmail.com
Wed Oct 30 03:25:48 UTC 2013
FWIW, I asked about this on stackoverflow a while back, and there were a
couple of good approaches, although nothing that completely achieves it
from ghci. I've used the ghci breakpoint trick a few times, although it's
doesn't give the "complete" type.
Here's the link:
On Tue, Oct 29, 2013 at 3:06 PM, Christopher Done <chrisdone at gmail.com>wrote:
> On 29 October 2013 22:36, martin <martin.drautzburg at web.de> wrote:
>> is there a way to determine types of symbols which are not toplevel but
>> inside a function?
> Not at present without transformation. There are two reasonably reliable
> Insert noisy holes/make intentional type errors:
> Implicit parameters:
> Holes will land in GHC to support this explicitly. I don't know what
> version of GHC has/will have this.
> Alternatively, you can use ghc-mod (
> https://github.com/kazu-yamamoto/ghc-mod) which, if you can get it to
> work, can tell you the types of sub-expressions.
> Lastly, the next version of the FP Complete IDE gives you types of
> sub-expressions just by clicking on them or selecting them out of the box.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe