<div dir="ltr"><div class="gmail_extra">I chose not to introduce another dependency. I just implemented the hash function by delegating to the Show instance of the nested type:</div><div class="gmail_extra"><br></div><div class="gmail_extra">

<div class="gmail_extra">data ValType = FloatType | IntType | StringType</div><div class="gmail_extra">    deriving (Show,Eq)</div><div><br></div><div><div>data VarName = VarName ValType String</div><div>    deriving (Show,Eq)</div>

<div><br></div><div>instance Hashable VarName where</div><div>    hash (VarName t n) = hash (show t ++ n)</div></div><div><br></div><div>Not super-efficient, but it&#39;ll be fine. The printString function (defined in that other package) uses a single character prefix for each ValType.</div>

<div><br></div><div>- Lyle</div></div></div>