"Talking" with the compiler

Hi, in order to build a programming environement, it would be nice to ask the GHC about symbols etc found in a given Haskell program. I've read that GHC has a interface, which was originally intended to plug in other backends. But I've never found a detailed description or API.... Can someone help me ? Thanks Hans

HNBeck:
Hi,
in order to build a programming environement, it would be nice to ask the GHC about symbols etc found in a given Haskell program. I've read that GHC has a interface, which was originally intended to plug in other backends. But I've never found a detailed description or API....
Can someone help me ?
Perhaps you are talking about the external Core interface. Documentation for that is here: http://www.haskell.org/ghc/docs/latest/html/users_guide/ext-core.html Also, there are many -ddump-xxx options, that can give you very useful information, at any level of the compiler. Info for that is here: http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html#... Cheers, Don

Hi, thank you, it's seems very helpful :-)) Greetings Hans Am 18.01.2004 um 00:31 schrieb Donald Bruce Stewart:
HNBeck:
Hi,
in order to build a programming environement, it would be nice to ask the GHC about symbols etc found in a given Haskell program. I've read that GHC has a interface, which was originally intended to plug in other backends. But I've never found a detailed description or API....
Can someone help me ?
Perhaps you are talking about the external Core interface. Documentation for that is here:
http://www.haskell.org/ghc/docs/latest/html/users_guide/ext-core.html
Also, there are many -ddump-xxx options, that can give you very useful information, at any level of the compiler. Info for that is here:
http://www.haskell.org/ghc/docs/latest/html/users_guide/flag- reference.html#AEN6775
Cheers, Don

HNBeck@t-online.de (Hans Nikolaus Beck) writes:
in order to build a programming environement, it would be nice to ask the GHC about symbols etc found in a given Haskell program.
I suppose a programming environment could talk to GHCi (which provides commands like :type, :info, :browse to explore the currently defined symbols)? -kzm -- If I haven't seen further, it is by standing in the footprints of giants

Hi, Am 18.01.2004 um 11:31 schrieb Ketil Malde:
HNBeck@t-online.de (Hans Nikolaus Beck) writes:
in order to build a programming environement, it would be nice to ask the GHC about symbols etc found in a given Haskell program.
I suppose a programming environment could talk to GHCi (which provides commands like :type, :info, :browse to explore the currently defined symbols)?
I've look shortly at the GHCi documentation. So I think it would be possible to include a "GHC engine" into a IDE application by redirecting input and output from GHCi to pipes (I rembemer that emacs used something similar for doing it's compile stuff). But that's hardcore UNIX, I've forgot how to do that :-((( Greetings Hans
-kzm -- If I haven't seen further, it is by standing in the footprints of giants
participants (3)
-
dons@cse.unsw.edu.au
-
HNBeck@t-online.de
-
Ketil Malde