trait Hash { fun hash() -> Int; // fun hashTo(hasher: Hasher); } impl Hash for Bool { fun hash() -> Int = self.hash(); } impl Hash for Byte { fun hash() -> Int = self.hash(); } impl Hash for Int { fun hash() -> Int = self.hash(); } impl Hash for Long { fun hash() -> Int = self.hash(); } impl Hash for Float { fun hash() -> Int = self.hash(); } impl Hash for Double { fun hash() -> Int = self.hash(); }