From b39f1fd161b0c5ac8fe3f0481c07ff13faa915ed Mon Sep 17 00:00:00 2001 From: Matus Tejiscak Date: Thu, 21 May 2020 17:30:27 +0200 Subject: [PATCH] Ignore DN layers in Hashable Name. So that hashes do not depend on irrelevant information, such as line/column numbers of interface implementations. --- src/Core/Hash.idr | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Core/Hash.idr b/src/Core/Hash.idr index 1a6c786f9..64b4d231c 100644 --- a/src/Core/Hash.idr +++ b/src/Core/Hash.idr @@ -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)