let rec not_excluded_type = function
(* excluded types *)
Base(Channel)
| Base(Channel_ota)
| Base(Channel_dy)
| Function(_) -> false
(* recursive checks *)
| Hash(t)
| Inv(t) ->
(not_excluded_type t)
| Pair(t1,t2)
| Scrypt(t1,t2)
| Crypt(t1,t2)
| Cons(t1,t2)
| Delete(t1,t2) ->
(not_excluded_type t1) && (not_excluded_type t2)
(* | Lst(lt) *)
| Set(lt) ->
List.for_all not_excluded_type lt
(* non-recursive useful types *)
| Base(_)
| Prime(_) -> true