Use normal generic constraints instead of static constraints (because we don't need the additional power of static constraints, and using normal constraints avoids a rare typechecking issue).
Add a type annotation to source parameter to work around a type-checker issue.