Changeset 15165 for src/Pugs/Prim.hs

Show
Ignore:
Timestamp:
02/02/07 04:10:20 (22 months ago)
Author:
audreyt
Message:

* Filetest operators are now removed; use smartmatch against Pairs instead:

-e 'README'

!-e 'README'

becomes:

'README':e
'README'
:!e

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim.hs

    r15000 r15165  
    4444import Pugs.Prim.Yaml 
    4545import Pugs.Prim.Match 
    46 import qualified Pugs.Prim.FileTest as FileTest 
    4746import Pugs.Prim.List 
    4847import Pugs.Prim.Numeric 
     
    417416op1 "rmdir" = guardedIO removeDirectory 
    418417op1 "chdir" = guardedIO setCurrentDirectory 
    419 op1 "-r"    = FileTest.isReadable 
    420 op1 "-w"    = FileTest.isWritable 
    421 op1 "-x"    = FileTest.isExecutable 
    422 op1 "-e"    = FileTest.exists 
    423 op1 "-z"    = FileTest.sizeIsZero 
    424 op1 "-s"    = FileTest.fileSize 
    425 op1 "-M"    = FileTest.fileMTime 
    426 op1 "-A"    = FileTest.fileATime 
    427 op1 "-C"    = FileTest.fileCTime 
    428 op1 "-f"    = FileTest.isFile 
    429 op1 "-d"    = FileTest.isDirectory 
    430418op1 "graphs"= op1Cast (VInt . (genericLength :: String -> VInt)) -- XXX Wrong 
    431419op1 "codes" = op1Cast (VInt . (genericLength :: String -> VInt)) 
     
    18251813\\n   Num       pre     exp     safe   (Num, ?Num)\ 
    18261814\\n   Num       pre     sqrt    safe   (Num)\ 
    1827 \\n   Bool      spre    -z      unsafe (Str)\ 
    1828 \\n   Bool      spre    -r      unsafe (Str)\ 
    1829 \\n   Bool      spre    -w      unsafe (Str)\ 
    1830 \\n   Bool      spre    -x      unsafe (Str)\ 
    1831 \\n   Bool      spre    -e      unsafe (Str)\ 
    1832 \\n   Int       spre    -s      unsafe (Str)\ 
    1833 \\n   Num       spre    -M      unsafe (Str)\ 
    1834 \\n   Num       spre    -A      unsafe (Str)\ 
    1835 \\n   Num       spre    -C      unsafe (Str)\ 
    1836 \\n   Bool      spre    -f      unsafe (Str)\ 
    1837 \\n   Bool      spre    -d      unsafe (Str)\ 
    18381815\\n   Num       spre    -       safe   (Num)\ 
    18391816\\n   Str       spre    ~       safe   (Str)\