From f4b19fee5c8aea758cfe6f496234a32a8e4adba3 Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 18 Dec 2015 17:31:20 +0800 Subject: [PATCH] compiler.types: make TValue hashable. --- artiq/compiler/types.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/artiq/compiler/types.py b/artiq/compiler/types.py index 9c34d785f..c7f88b9f4 100644 --- a/artiq/compiler/types.py +++ b/artiq/compiler/types.py @@ -491,6 +491,9 @@ class TValue(Type): def __ne__(self, other): return not (self == other) + def __hash__(self): + return hash(self.value) + class TDelay(Type): """ The type-level representation of IO delay.