#7457: printf's * doesn't like negative numbers
-----------------------------+----------------------------------------------
Reporter:  elaforge          |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  libraries/base  
 Version:  7.6.1             |       Keywords:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  None/Unknown      |      Blockedby:                  
Blocking:                    |        Related:                  
-----------------------------+----------------------------------------------
 Text.Printf.printf has a bug where it doesn't like negative numbers for *
 modifiers:

 {{{
 Prelude Text.Printf> printf "%*sx\n" (-3) "hi"
 hix
 }}}

 In the C printf, this would be
 {{{
 hi x
 }}}

 From looking at the source, it's a pretty easy bug to fix.  Patch
 attached.  I also included a patch to turn the mixed tabs and spaces into
 just spaces since I hate that stuff.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7457>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to