danmey / Ilist

Indexed lists for OCaml
3 stars 1 forks source link

Exhaustiveness checks #1

Open lpw25 opened 11 years ago

lpw25 commented 11 years ago

The fix for bug #5892 which is now on trunk means that both NList and IList produce exhaustiveness warnings. It is also likely that other people's code using the lists will produce such warnings. This is because it is not always clear to the compiler that types cons and nil are definitely not the same type.

I would suggest changing their definitions to:

type (, ) cons = private TCons type nil = private TNil

this makes it clear that they are definitely not the same type.

danmey commented 11 years ago

Many thanks for your invaluable comment, it's been fixed in git.