Changeset 6010

Show
Ignore:
Timestamp:
08/03/05 00:39:19 (3 years ago)
Author:
putter
svk:copy_cache_prev:
8154
Message:

/a/ "a" now works, rather than only "a" /a/. iblech++ #haskell++

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim/Match.hs

    r5335 r6010  
    7171    subsMatch = [ VMatch $ mkMatchOk 0 0 (decodeUTF8 sub) [] Map.empty | sub <- subs ] 
    7272 
     73-- Used in op2Match 
     74not_VRule :: Val -> Bool 
     75not_VRule _y@(VRule _) = False 
     76not_VRule _            = True 
     77 
    7378-- XXX - need to generalise this 
    7479op2Match :: Val -> Val -> Eval Val 
     
    156161        (return $ VMatch match) 
    157162 
     163op2Match x@(VRule _) y | not_VRule y = do 
     164    op2Match y x 
     165 
    158166op2Match (VType typ) (VType t) = do 
    159167    typs <- pkgParents (showType typ)