Ignore DN layers in Hashable Name.

So that hashes do not depend on irrelevant information,
such as line/column numbers of interface implementations.
This commit is contained in:
Matus Tejiscak 2020-05-21 17:30:27 +02:00
parent 8291c8bbeb
commit b39f1fd161

View File

@ -64,6 +64,8 @@ Hashable String where
export
Hashable Name where
hashWithSalt h (MN s _) = hashWithSalt h s
hashWithSalt h (DN _ n) = hashWithSalt h n
hashWithSalt h (NS ns n) = hashWithSalt (hashWithSalt h ns) n
hashWithSalt h (Resolved i) = hashWithSalt h i
hashWithSalt h n = hashWithSalt h (show n)