[project @ 2000-09-29 15:59:28 by sewardj]
[ghc-hetmet.git] / ghc / compiler / ghci / CmLink.lhs
1 %
2 % (c) The AQUA Project, Glasgow University, 1993-2000
3 %
4 \section[CmLink]{Linker for GHCI}
5
6 \begin{code}
7 module CmLink ( Linkable(..), LinkResult(..),
8                 HValue,
9                 link, 
10                 PLS{-abstractly!-}, emptyPLS )
11                   
12 where
13
14 import CmStaticInfo     ( PCI )
15 import CmFind           ( Path, PkgName )
16 import Module           ( Module )
17 import Outputable       ( SDoc )
18 import FiniteMap        ( FiniteMap )
19 import RdrName          ( RdrName )
20 import Addr             ( Addr )
21
22 #include "HsVersions.h"
23
24 \end{code}
25
26 \begin{code}
27 data PLS 
28    = MkPLS {
29         source_symtab :: FiniteMap RdrName HValue,
30         object_symtab :: FiniteMap String Addr
31      }
32
33 data HValue = HValue -- fix this ... just temporary?
34
35
36 link :: PCI -> [[Linkable]] -> PLS -> IO LinkResult
37 link pci linkabless pls
38    = return (error "link:unimp")
39
40 data LinkResult 
41    = LinkOK   PLS
42    | LinkErrs PLS [SDoc]
43
44 data Unlinked
45    = DotO Path
46    | DotA Path
47    | DotDLL Path
48    -- | Trees [StgTree RdrName]
49
50 data Linkable
51    = LM Module [Unlinked]
52    | LP PkgName
53
54 emptyPLS :: IO PLS
55 emptyPLS = return (error "emptyPLS:unimp")
56 \end{code}