Changeset 19198 for src/Pugs/Prim.hs
- Timestamp:
- 12/12/07 20:43:02 (12 months ago)
- Files:
-
- 1 modified
-
src/Pugs/Prim.hs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Prim.hs
r19002 r19198 958 958 perlReplicate = genericReplicate . max 0 959 959 960 -- XXX only used at op2 "?^" because my Haskell is too poor - ferreira 961 neBool :: VBool -> VBool -> VBool 962 neBool = (==) . not 963 960 964 -- |Implementation of 2-arity primitive operators and functions 961 965 op2 :: String -> Val -> Val -> Eval Val … … 985 989 op2 "?&" = op2Bool (&&) 986 990 op2 "~^" = op2Str $ mapStr2Fill xor 991 op2 "?^" = op2Bool neBool -- for bools, 'xor' is the same as '!==' 987 992 op2 "=>" = \x y -> return $ castV (x, y) 988 993 op2 "=" = \x y -> evalExp (Syn "=" [Val x, Val y]) … … 2122 2127 \\n Str left ~^ safe (Str, Str)\ 2123 2128 \\n Bool left ?| safe (Bool, Bool)\ 2129 \\n Bool left ?^ safe (Bool, Bool)\ 2124 2130 \\n Bool left ?& safe (Bool, Bool)\ 2125 2131 \\n Pair right => safe (Any, Any)\
