Changeset 12784

Show
Ignore:
Timestamp:
05.11.2009 17:00:35 (2 weeks ago)
Author:
maeder
Message:

fail by returning Nothing for wrong types

Location:
trunk/HasCASL
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/HasCASL/TypeAna.hs

    r12730 r12784  
    2929import Control.Monad 
    3030 
    31 -- * infer kind 
     31 -- * infer kind 
    3232 
    3333-- | extract kinds of type identifier 
     
    6464        ("no kind found for '" ++ showDoc ty "'" ++ 
    6565         if Set.null ks then "" else expected sk ks) 
    66         $ getRange ty] $ Just Set.empty 
     66        $ getRange ty] $ if dk == Error then Nothing else Just Set.empty 
    6767 
    6868-- | add an analysed type argument (warn on redeclared types) 
  • trunk/HasCASL/test/PlainTypes.hascasl.output

    r12528 r12784  
    88type  tuple3 : a -> b -> c -> d 
    99var   x : tuple3 r s t 
    10 var   y : tuple3 r s 
     10var 
    1111type  tuple1 : b -> a 
    1212type  m : (a -> b) -> c 
     
    1414type  List : a -> b 
    1515var   w : m List 
    16 var   o1 : m 
    17 var   o2 : m tuple1 
    18 var   o3 : m tuple3 
     16var 
     17var 
     18var 
    1919var   nt : a -> (b -> c) -> c -> d 
    20 var   o4 : nt r List s 
     20var 
    2121types s1, r1, t1 < t 
    2222types s2 = r2 = t2 
     
    5656nt : a -> (b -> c) -> c -> d %(var_1)% 
    5757vars 
    58 o1 : m; 
    59 o2 : m tuple1; 
    60 o3 : m tuple3; 
    61 o4 : nt r List s; 
    6258u : [ r ]; 
    6359v : { s }; 
    6460w : m List; 
    6561x : tuple3 r s t; 
    66 y : tuple3 r s; 
    6762z : m [__] 
    6863forall x : t . (x in s3) <=> x = x