Comparing StableNames of different type

Emil Axelsson emax at
Fri Aug 24 08:39:21 CEST 2012


Are there any dangers in comparing two StableNames of different type?

   stEq :: StableName a -> StableName b -> Bool
   stEq a b = a == (unsafeCoerce b)

I could guard the coercion by first comparing the type representations, 
but that would give me a `Typeable` constraint that would spread 
throughout the code.

/ Emil

More information about the Glasgow-haskell-users mailing list