Make the RuntimeRep argument to error/undefined Inferred
Currently we have:
undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => String -> a
errorWithoutStackTrace :: forall (r :: RuntimeRep) (a :: TYPE r). String -> a
I would like to propose these be changed to:
undefined :: forall {r :: RuntimeRep} (a :: TYPE r). HasCallStack => a
error :: forall {r :: RuntimeRep} (a :: TYPE r). HasCallStack => String -> a
errorWithoutStackTrace :: forall {r :: RuntimeRep} (a :: TYPE r). String -> a
This would allow users to write undefined @Int
instead of undefined @_ @Int
or (undefined :: Int)
.
The concern is that this would fix code in the wild like undefined @_ @Int
. I don't know how big of an impact this would have.