[project @ 2002-03-05 14:18:53 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / BinIface.hs
index 50d465d..799ce15 100644 (file)
@@ -5,7 +5,7 @@
 -- 
 -- Binary interface file support.
 
-module BinIface ( writeBinIface, compileIface ) where
+module BinIface ( writeBinIface ) where
 
 import HscTypes
 import BasicTypes
@@ -18,19 +18,14 @@ import TyCon
 import Class
 import VarEnv
 import CostCentre
-import Module          ( mkHomeModule )
 import Name            ( Name, nameOccName )
 import NameEnv         ( NameEnv, lookupNameEnv, nameEnvElts )
 import OccName         ( OccName )
 import RnMonad         ( ParsedIface(..) )
 import RnHsSyn
 import DriverState     ( v_Build_tag )
-import DriverUtil      ( newsuf )
-import Lex
 import CmdLineOpts     ( opt_IgnoreIfacePragmas, opt_HiVersion )
 import StringBuffer    ( hGetStringBuffer )
-import ParseIface      ( parseIface )
-import Outputable
 import Panic
 import SrcLoc
 
@@ -377,21 +372,6 @@ writeBinIface hi_path mod_iface =
   putBinFileWithDict hi_path (mi_module mod_iface) mod_iface
 
 -- ----------------------------------------------------------------------------
--- Compile an interface from text into binary
-
-compileIface :: FilePath -> IO ()
-compileIface infile = do
-   let outfile = newsuf "hi" infile    -- make it a .hi file
-   buf <- hGetStringBuffer False infile
-   case parseIface buf (mkPState loc exts) of
-       PFailed err -> throwDyn (ProgramError (showSDoc err))
-       POk _ iface ->
-          putBinFileWithDict outfile (mkHomeModule (pi_mod iface)) iface
-  where
-   exts = ExtFlags {glasgowExtsEF = True,
-                   parrEF         = True}
-   loc  = mkSrcLoc (FastString.mkFastString infile) 1
-
 {-* Generated by DrIFT-v1.0 : Look, but Don't Touch. *-}
 
 --  Imported from other files :-