Infer instantiations for polymorphic arguments to polymorphic functions

Open
#21 · Created  · Last updated

Description

This is currently broken because define-type can't infer variance for recursive types.

This lets polymorphic functions be applied to polymorphic arguments without needing explicit instantiations. This also allows values such as Nil to be polymorphic, because all function applications can handle possibly polymorphic values for all of the arguments, and it instantiates them properly by handling constraints with type variables on both sides.

This also solves issue #15.

0 attachments

0 comments

Loading commits...