Changeset 5397 for src/Main.hs

Show
Ignore:
Timestamp:
07/11/05 08:18:30 (3 years ago)
Author:
autrijus
svk:copy_cache_prev:
7349
Message:

* Compilation no longer include prelude, unless PUGS_COMPILE_PRELUDE is set.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Main.hs

    r5393 r5397  
    175175    codeGen backend env{ envGlobal = globRef } 
    176176 
     177initCompile :: IO () 
     178initCompile = do 
     179    compPrelude <- getEnv "PUGS_COMPILE_PRELUDE" 
     180    writeIORef _BypassPreludePC $ case compPrelude of 
     181        Nothing     -> True 
     182        Just ""     -> True 
     183        Just "0"    -> True 
     184        _           -> False 
     185 
    177186doCompileDump :: String -> FilePath -> String -> IO () 
    178187doCompileDump backend file prog = do 
     188    initCompile 
    179189    str <- doCompile backend' file prog 
    180190    putStr str 
     
    186196doCompileRun :: String -> FilePath -> String -> IO () 
    187197doCompileRun backend file prog = do 
     198    initCompile 
    188199    str <- doCompile backend' file prog 
    189200    evalEmbedded backend' str