Changeset 14599 for src/Pugs/Prim.hs
- Timestamp:
- 11/03/06 05:30:51 (2 years ago)
- svk:copy_cache_prev:
- 41990
- Files:
-
- 1 modified
-
src/Pugs/Prim.hs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Prim.hs
r14574 r14599 73 73 op0 "time" = const $ do 74 74 clkt <- guardIO getClockTime 75 return $ VRat $ fdiff $ diffClockTimes clkt epochClkT 76 where 77 epochClkT = toClockTime epoch 78 epoch = CalendarTime 2000 January 1 0 0 0 0 Saturday 0 "UTC" 0 False 79 -- 10^12 is expanded because the alternatives tried gave type warnings. 80 fdiff = \d -> (fromInteger $ tdPicosec d) 81 / (clocksPerSecond * clocksPerSecond) 82 + (fromIntegral $ tdSec d) 75 return $ VRat $ pugsTimeSpec clkt 83 76 op0 "times" = const $ do 84 77 ProcessTimes _ u s cu cs <- guardIO getProcessTimes … … 430 423 op1 "-z" = FileTest.sizeIsZero 431 424 op1 "-s" = FileTest.fileSize 425 op1 "-M" = FileTest.fileMTime 426 op1 "-A" = FileTest.fileATime 427 op1 "-C" = FileTest.fileCTime 432 428 op1 "-f" = FileTest.isFile 433 429 op1 "-d" = FileTest.isDirectory … … 1824 1820 \\n Bool spre -e unsafe (Str)\ 1825 1821 \\n Int spre -s unsafe (Str)\ 1822 \\n Num spre -M unsafe (Str)\ 1823 \\n Num spre -A unsafe (Str)\ 1824 \\n Num spre -C unsafe (Str)\ 1826 1825 \\n Bool spre -f unsafe (Str)\ 1827 1826 \\n Bool spre -d unsafe (Str)\
