Show
Ignore:
Timestamp:
05/23/05 04:23:41 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
5201
Message:

* Type-to-type smartmatch, e.g. Int ~~ Num, now works.

Files:
1 modified

Legend:

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

    r3372 r3708  
    7878    op2Match x y' 
    7979 
    80 op2Match x (VType t) = do 
    81     typ <- evalValType x 
     80op2Match (VType typ) (VType t) = do 
    8281    cls <- asks envClasses 
    8382    return $ VBool (isaType cls (showType t) typ) 
     83 
     84op2Match x y@(VType _) = do 
     85    typ <- evalValType x 
     86    op2Match (VType typ) y 
    8487 
    8588op2Match x (VSubst (rx, subst)) | rxGlobal rx = do