Steps to Reproduce
badEq : ((x: Nat) -> Nat) = ((1 x:Nat) -> Nat)
badEq = Refl
Expected Behavior
The term should not typecheck because this can be used to cast (x: Nat) -> Nat to (1 x:Nat) -> Nat, this sort of trick could easily be used to make "safe" terms of type IO ((0 x: Type) -> IO x -> x) which could grotesquely break things.
Observed Behavior
It type checks, though it is of note that
- If you reverse the order in the type definition, (i.e.
badEq : ( (1 x:Nat) -> Nat ) = ( (x: Nat) -> Nat)) it does not type check
- This doesn't work with erased arguments