Conversation

Why is parametric polymorphism limited to just types? What if I want to write a function `(n : Nat) -> Fin n -> Fin n` that cannot pattern match on the value of `n`?
2
3
I also would occasionally like to pattern match on types. Can't my type signature distinguish which parameters can be used in elim rules and which ones can't?
2
1
as in type case would be allowed by default, but type variables (by default) would be inferred like {0 a : Type} ? that'd be great!
1
2
If we allow type case, then we would lose very nice reasoning properties we get through parametricity, e.g. that there is only one implementation of the identity function. However with linearity, we will know from the resource annotation whether we are casing on a type.
1
4