[Haskell-cafe] Re: OOP'er with (hopefully) trivial questions.....

Luke Palmer lrpalmer at gmail.com
Mon Dec 17 13:48:54 EST 2007


There was a thread about this recently.

In any case, if you load the code interpreted (which happens if there
is no .o or .hi file of the module lying around), then you can
look inside all you want.  But if it loads compiled, then you only
have access to the exported symbols.  The reason is because of
inlining optimizations; you know about the encapsulation of the module
when you compile it, and you can optimize the memory and
code usage based on compiling functions that are not exported
differently.  That's my weak understanding, at least.

Luke

On Dec 17, 2007 5:52 PM, Peter Hercek <phercek at gmail.com> wrote:
> Thomas Davie wrote:
> > Take a look at the Typable class.  Although, pretty much any code that
> > you can compile can be loaded into ghci without modification, and that's
> > by far the easier way of finding the types of things.
>
> Is there a way to make ghci to know also the symbols which are not exported?
> My problem is that :t <unexportedSymbolName> reports undefined. Is there a
> way to make :t working without first exporting <unexportedSymbolName> and
> then reloading the module in ghci and asking with :t again?
>
> Peter.
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list