Changeset 8472 for src/Pugs.hs

Show
Ignore:
Timestamp:
12/27/05 07:44:33 (3 years ago)
Author:
audreyt
Message:

* As lexical import is implemented correctly by gaal++,

we no longer need the withInlinedIncludes hack to get
"use" statements working with PIL-based compilation.
Thanks to clkao++ for prompting this fix.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs.hs

    r8315 r8472  
    3636import Pugs.CodeGen 
    3737import Pugs.Embed 
    38 import Pugs.Prim.Eval (requireInc) 
    3938import qualified Data.Map as Map 
    4039import Data.IORef 
     
    8281    exec <- getArg0 
    8382    doHelperRun "JS" ("--compile-only":("--pugs="++exec):args) 
    84 run ("-C":backend:"-e":prog:_)           = withInlinedIncludes prog >>= doCompileDump backend "-e" 
    85 run ("-C":backend:file:_)                = readFile file >>= withInlinedIncludes >>= doCompileDump backend file 
     83run ("-C":backend:"-e":prog:_)           = doCompileDump backend "-e" prog 
     84run ("-C":backend:file:_)                = readFile file >>= doCompileDump backend file 
    8685 
    8786run ("-B":backend:_) | (== map toLower backend) `any` ["js","perl5"] = do 
     
    8988    args <- getArgs 
    9089    doHelperRun backend (("--pugs="++exec):args) 
    91 run ("-B":backend:"-e":prog:_)           = withInlinedIncludes prog >>= doCompileRun backend "-e" 
    92 run ("-B":backend:file:_)                = readFile file >>= withInlinedIncludes >>= doCompileRun backend file 
     90run ("-B":backend:"-e":prog:_)           = doCompileRun backend "-e" prog 
     91run ("-B":backend:file:_)                = readFile file >>= doCompileRun backend file 
    9392 
    9493run ("--external":mod:"-e":prog:_)    = doExternal mod "-e" prog 
     
    417416    evalParrotFile "a.pir" 
    418417 
     418{- 
    419419withInlinedIncludes :: String -> IO String 
    420420withInlinedIncludes prog = do 
     
    444444        readFile pathName 
    445445    errMsg fn incs = "Can't locate " ++ fn ++ " in @*INC (@*INC contains: " ++ unwords incs ++ ")." 
    446  
     446-}