Revision 5500edb8 src/types.ml
src/types.ml | ||
---|---|---|
252 | 252 |
| _ -> false |
253 | 253 |
|
254 | 254 |
let rec is_array_type ty = |
255 |
match (repr ty).tdesc with |
|
256 |
| Tarray _ -> true |
|
257 |
| Tstatic (_, ty') -> is_array_type ty' (* looks strange !? *)
|
|
258 |
| _ -> false |
|
255 |
match (repr ty).tdesc with
|
|
256 |
| Tarray _ -> true
|
|
257 |
| Tstatic (_, ty') -> is_array_type ty' (* We unfold static type and check underlying type *)
|
|
258 |
| _ -> false
|
|
259 | 259 |
|
260 | 260 |
let array_type_dimension ty = |
261 | 261 |
match (dynamic_type ty).tdesc with |
... | ... | |
323 | 323 |
| Tstatic (d, ty) -> Dimension.is_polymorphic d || is_polymorphic ty |
324 | 324 |
| Tunivar -> true |
325 | 325 |
|
326 |
let multidim ty = List.length (array_type_multi_dimension ty) |
|
326 | 327 |
|
327 | 328 |
let mktyptuple nb typ = |
328 | 329 |
let array = Array.make nb typ in |
Also available in: Unified diff