[Haskell-cafe] (names for) invariants for Eq and Ord?

Olaf Klinke olf at aatal-apotheke.de
Wed May 30 19:45:00 UTC 2018

Prelude> import qualified Data.Map as M
   Prelude M> let k = 0/0 in let v = 0 in M.lookup k (M.insert k v
M.empty) == Just v

This one is not surprising because the presence of 0/0 destroys the total order of Double, so strictly speaking this should not have an Ord instance. 


More information about the Haskell-Cafe mailing list