-
Notifications
You must be signed in to change notification settings - Fork 189
Open
Description
-- Duplication of entry points because monomorphisation thought the
-- second use had a different type (because it is a more specific size
-- instantiation).
entry foo [n] [m] (A: [n][m]i32) = A
entry bar [n] (B: [n][n]i32) = foo B
From #2218. It is not so difficult to fix this with a quick workaround, at the cost of more duplications of size-polymorphic functions. A better solution is for monomorphisation to be slightly smarter about when a specific use of a size-polymorphic function is an instance of the general case. Actually, it is pretty rare that functions should be monomorphised based on sizes - in practice, probably only for sizes in instantiations of lifted type parameters.