Changeset 14599 for src/Pugs/AST.hs

Show
Ignore:
Timestamp:
11/03/06 05:30:51 (2 years ago)
Author:
allbery_b
svk:copy_cache_prev:
41990
Message:

AUTHORS: hello, world\n :)
src/Pugs/Compat.hs: added file time tests
src/Pugs/Internals.hs, src/Pugs/Prim.hs: abstract out guts of "time" for

use in $*BASETIME and file tests

src/Pugs/Run.hs: add $*BASETIME
src/Pugs/AST.hs: document _reserved and filterUserDefinedPad; add $*BASETIME

to _reserved

src/Pugs/Prim.hs: add file time operators -M, -C, -A
src/Pugs/Prim/FileTest.hs: add implementation of file time operators
t/operators/filetest.t: correct existing file time operator tests, add a few

more, add all of them to the plan

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/AST.hs

    r14303 r14599  
    342342    isPrimVal _ = False 
    343343 
     344{-| 
     345Filter out reserved symbols from the specified Pad. 
     346-} 
    344347filterUserDefinedPad :: Pad -> Pad 
    345348filterUserDefinedPad (MkPad pad) = MkPad $ Map.filterWithKey doFilter pad 
     
    347350    doFilter key _ = (not . Set.member key) _reserved 
    348351 
     352{-| 
     353Symbols which are reserved for the current interpreter/compiler instance and 
     354should not be set from the preamble or other sources.  See 
     355@Pugs.AST.filterUserDefinedPad@. 
     356-} 
    349357_reserved :: Set Var 
    350358_reserved = Set.fromList . cast . words $ 
     
    352360    "$*PROGRAM_NAME $*PID $*UID $*EUID $*GID $*EGID @*CHECK @*INIT $*IN " ++ 
    353361    "$*OUT $*ERR $*ARGS $/ %*ENV $*CWD @=POD $=POD $?PUGS_VERSION " ++ 
    354     "$*OS %?CONFIG $*_ $*AUTOLOAD $*PUGS_VERSION" 
     362    "$*OS %?CONFIG $*_ $*AUTOLOAD $*PUGS_VERSION $*BASETIME" 
    355363 
    356364typeOfParam :: Param -> Type