Skip to content

Duplication of entry points #2220

@athas

Description

@athas
-- 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions