Changes between Version 3 and Version 4 of UsingGhcAsLibrary


Ignore:
Timestamp:
Dec 8, 2005 8:36:02 PM (9 years ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UsingGhcAsLibrary

    v3 v4  
    1 In GHC 6.4 and subsequently you can import GHC as a Haskell library, which lets you write a Haskell program that has access to all of GHC.  
     1In GHC 6.5 and subsequently you can import GHC as a Haskell library, which lets you write a Haskell program that has access to all of GHC.  
    22 
    33This page is a place for everyone to add 
     
    88 
    99= Getting started = 
    10 To do this you say simply  
     10You'll need to get a version of GHC that supports the GHC API.  Either download ghc from [http://www.haskell.org/ghc/docs/latest/html/building/sec-cvs.html CVS] or use darcs: {{{darcs get --partial http://darcs.haskell.org/ghc}}}.  There are also [http://www.haskell.org/ghc/dist/current/dist nightly snapshot distributions] available. 
     11 
     12To use the GHC API you say simply  
    1113{{{ 
    1214  import GHC 
    1315}}} 
    14 Doing this imports the module `GHC` from the package `ghc`, which comes with GHC 6.4 and subsequent.  The module GHC exports the "GHC API", which is still in a state of flux.  Currently it's not even Haddock-documented.  You can see the source code (which is somewhat documented) here  
     16Doing this imports the module `GHC` from the package `ghc`, which comes with GHC 6.5 and subsequent.  The module GHC exports the "GHC API", which is still in a state of flux.  Currently it's not even Haddock-documented.  You can see the source code (which is somewhat documented) here  
    1517http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/ghc/compiler/main/GHC.hs 
    1618