Strong type constraints for Scala