On Thu, 25 Oct 2007, Don Stewart wrote: > claus.reinke: > > > > how about using ghc's new overloaded strings for this? > > > > "10111011"::Binary > > > > there used to be a way to link to ghc head's docs, but > > i can't find it right now. the test is > > > > http://darcs.haskell.org/testsuite/tests/ghc-regress/typecheck/should_compile/tc224.hs > > > > and the xml docs would be > > > > http://darcs.haskell.org/ghc/docs/users_guide/glasgow_exts.xml > > Why not use a Num instance for Binary, with fromInteger :: Integer -> a, > Yielding, > > 10111011 :: Binary > > Overloaded numeric literals seem better here than strings :)
The result would be very unexpected - it reminds me much on C's octal interpretation of all number literals starting with a 0. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
