Changeset 2401 for src/Pugs/Compile.hs

Show
Ignore:
Timestamp:
04/27/05 17:17:20 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
3914
Message:

* compile subroutines to Parrot.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Compile.hs

    r2396 r2401  
    1212module Pugs.Compile where 
    1313import Pugs.AST 
     14import Pugs.Internals 
    1415import Pugs.Compile.Pugs (genPugs) 
    1516import Pugs.Compile.Parrot (genPIR) 
     
    1718 
    1819compile :: String -> Env -> IO String 
    19 compile "Haskell" = genGHC 
    20 compile "Pugs" = genPugs 
    21 compile "Parrot" = genPIR 
    22 compile s = const (error $ "Cannot compile to " ++ s) 
     20compile "Haskell" env = fmap vCast $ runEval env genGHC 
     21compile "Pugs"    env = fmap vCast $ runEval env genPugs 
     22compile "Parrot"  env = fmap vCast $ runEval env genPIR 
     23compile s _ = fail $ "Cannot compile to " ++ s 
    2324