[Haskell-cafe] Ord for partially ordered sets
Barak A. Pearlmutter
barak at cs.nuim.ie
Fri Apr 24 20:22:38 UTC 2015
> I'm confused. What is supposed to be the result of `g1 <= g2` when `g1` and
> `g2` are not comparable according to the partial order?
Surely it would make things less confusing to simply follow existing
precedent already in the standard prelude?
Prelude> let nan=0/0::Double
Prelude> compare 0 nan
Prelude> compare nan 0
Prelude> compare nan nan
Prelude> let infty=1/0::Double
Prelude> infty <= nan
Prelude> nan <= infty
More information about the Haskell-Cafe