dependent types in scala