[Haskell-cafe] Binary constants in Haskell
dons at galois.com
Thu Oct 25 12:40:56 EDT 2007
> >>> From my point of view, the difference between 0b10111011 and
> >>> (bin[1,0,1,1,1,0,1,1]) is 22-10 that is 12 characters.
> how about using ghc's new overloaded strings for this?
> there used to be a way to link to ghc head's docs, but
> i can't find it right now. the test is
> and the xml docs would be
Why not use a Num instance for Binary, with fromInteger :: Integer -> a,
10111011 :: Binary
Overloaded numeric literals seem better here than strings :)
More information about the Haskell-Cafe