Although Idris is dependently typed, where values can be used freely in types, it still differentiate function id and functor Identity. Why can't I define Functor instances on id:
Functor id where
map = id
The type of id is id : a -> a, why can't a be unified with Type, so that map @{Functor id} has type (a -> b) -> id a -> id b, which is just (a -> b) -> a -> b
I understand that Identity is a type wrapper but why do I need a separate id at type level, just to enable the implementation of typeclass instances.
The only difference of Identity and id is that Identity a cannot be evaluated to a, but it’s still a Type -> Type function, same as id {a=Type} in type.