Changeset 9256 for src/Pugs/Compile.hs

Show
Ignore:
Timestamp:
03/03/06 15:52:56 (3 years ago)
Author:
audreyt
Message:

* workaround to get PIL2JS compiling -- PIL wasn't handling VRefs correctly.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Compile.hs

    r8774 r9256  
    404404{-| Compiles a 'Val' to a 'PIL_Literal'. -} 
    405405instance Compile Val PIL_Literal where 
     406    compile (VList vs) = return $ PVal (VList (filter isSimple vs)) 
     407        where 
     408        isSimple (VRef _) = False 
     409        isSimple _        = True 
     410    compile (VRef _) = return $ PVal VUndef 
    406411    compile val = return $ PVal val 
    407412