Changeset 643

Show
Ignore:
Timestamp:
03/13/05 08:19:18 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
1998
Message:

* fix ordering; better debug msg for unimplemented ops

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Prim.hs

    r642 r643  
    3333    epoch = CalendarTime 2000 January 1 0 0 0 0 Saturday 0 "UTC" 0 False 
    3434op0 "not" = const retEmpty 
    35 op0 s    = \x -> return $ VError ("unimplemented listOp: " ++ s) (Val $ VList x) 
    36  
    3735op0 "¥" = return . VList . concat . transpose . map vCast 
    3836op0 "Y" = op0 "¥" 
     37op0 other = \x -> return $ VError ("unimplemented listOp: " ++ other) (App other (map Val x) []) 
    3938 
    4039retEmpty = do 
     
    215214op1 "shift"= op1Pop (head, tail) 
    216215op1 "pick" = op1Pick 
    217 op1 s      = return . (\x -> VError ("unimplemented unaryOp: " ++ s) (Val x)) 
     216op1 other  = return . (\x -> VError ("unimplemented unaryOp: " ++ other) (App other [Val x] [])) 
    218217 
    219218 
     
    382381        | glue `isPrefixOf` rest = ([], rest) 
    383382        | otherwise = (x:piece, rest') where (piece, rest') = breakOnGlue glue xs 
    384 op2 s    = \x y -> return $ VError ("unimplemented binaryOp: " ++ s) (App s [] [Val x, Val y]) 
     383op2 other = \x y -> return $ VError ("unimplemented binaryOp: " ++ other) (App other [Val x, Val y] []) 
    385384 
    386385op2Hyper op x y