Show
Ignore:
Timestamp:
01/15/06 08:26:19 (3 years ago)
Author:
audreyt
Message:

* DriFT.YAML: Dumping Haskell structures as YAML.
* ./pugs -CPIL1-YAML etc works.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/CodeGen/PIL2.hs

    r7866 r8675  
    44module Pugs.CodeGen.PIL2 ( 
    55    genPIL2, 
    6     genPIL2Perl5, genPIL2Binary, genPIL2JSON 
     6    genPIL2Perl5, genPIL2Binary, genPIL2JSON, genPIL2YAML 
    77) where 
    88import Pugs.Internals 
     
    1515import DrIFT.Binary 
    1616import DrIFT.JSON 
     17import DrIFT.YAML 
    1718 
    1819genPIL2 :: Eval Val 
     
    4647    penv <- compile () :: Eval PIL_Environment 
    4748    return . VStr . unlines $ [showJSON penv] 
     49 
     50genPIL2YAML :: Eval Val 
     51genPIL2YAML = do 
     52    penv <- compile () :: Eval PIL_Environment 
     53    yaml <- liftIO (showYaml penv) 
     54    return . VStr . unlines $ [yaml]