Show
Ignore:
Timestamp:
05.01.2009 13:38:28 (11 months ago)
Author:
maeder
Message:

ignore partiality in symbol mappings

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/CASL/Morphism.hs

    r11213 r11214  
    178178      case (s, t) of 
    179179        (Qual_id _ t1 _, Qual_id _ t2 _) -> case (t1, t2) of 
    180           (O_type (Op_type k1 args1 res1 _), O_type (Op_type k2 args2 res2 _)) 
    181             | length args1 == length args2 && k2 <= k1 -> 
     180          (O_type (Op_type _ args1 res1 _), O_type (Op_type _ args2 res2 _)) 
     181            | length args1 == length args2 -> -- ignore partiality 
    182182            return $ (w, x) : (mkS res1, mkS res2) 
    183183              : zipWith (\ s1 s2 -> (mkS s1, mkS s2)) args1 args2 
     
    186186            return $ (w, x) 
    187187              : zipWith (\ s1 s2 -> (mkS s1, mkS s2)) args1 args2 
    188           (O_type (Op_type Partial [] res1 _), A_type s2) -> 
     188          (O_type (Op_type _ [] res1 _), A_type s2) -> 
    189189            return [(w, x), (mkS res1, mkS s2)] 
     190          (A_type s1, O_type (Op_type _ [] res2 _)) -> 
     191            return [(w, x), (mkS s1, mkS res2)] 
     192          (A_type s1, A_type s2) -> 
     193            return [(w, x), (mkS s1, mkS s2)] 
    190194          _ -> fail $ "profiles '" ++ showDoc t1 "' and '" 
    191195               ++ showDoc t2 "' do not match"