Replying to all. Sorry for the duplicate, Florian. The fact that the constructor `PortNum` is exported has been argued to be a bug in past discussions. PortNumber is stored big endian, which leads to behaviors that people don't expect. I suggest you lean on the fact that PortNumber is an instance of the Num class:
ghci ... > 478 :: PortNumber 478 Cheers, Thomas On Wed, Apr 10, 2013 at 12:26 AM, Florian Hofmann < fhofm...@techfak.uni-bielefeld.de> wrote: > I might be mistaken, but is there a bug in the Show instance of PortNum? > > > λ PortNum 1 > 256 > λ PortNum 2 > 512 > λ PortNum 3 > 768 > > λ let (PortNum x) = PortNum 10 > λ x > 10 > > Tested with network-2.4.1.2 > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > >
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe