Re: [GHC] #5509: quotes pretty-printer not working as comments specify

2011-10-10 Thread GHC
#5509: quotes pretty-printer not working as comments specify
+---
  Reporter:  mgsloan1   |  Owner:   
   
  Type:  bug| Status:  closed   
   
  Priority:  normal |  Milestone:   
   
 Component:  Compiler   |Version:  7.2.1
   
Resolution:  fixed  |   Keywords:  prettyprint  
   
  Testcase: |  Blockedby:   
   
Difficulty: | Os:  
Unknown/Multiple
  Blocking: |   Architecture:  
Unknown/Multiple
   Failure:  Incorrect warning at compile-time  |  
+---

Comment(by simonmar):

 Replying to [comment:5 igloo]:
  Would it make more sense to never quote identifiers?

 We should use proper Unicode single quotes, if the locale supports
 Unicode, or better still use coloured output.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5509#comment:7
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


Re: [GHC] #5509: quotes pretty-printer not working as comments specify

2011-09-29 Thread GHC
#5509: quotes pretty-printer not working as comments specify
-+--
Reporter:  mgsloan1  |Owner:
   
Type:  bug   |   Status:  new   
   
Priority:  normal|Milestone:
   
   Component:  Compiler  |  Version:  7.2.1 
   
Keywords:  prettyprint   | Testcase:
   
   Blockedby:|   Difficulty:
   
  Os:  Unknown/Multiple  | Blocking:
   
Architecture:  Unknown/Multiple  |  Failure:  Incorrect warning at 
compile-time
-+--

Comment(by simonpj@…):

 commit ba60fc61ba5bbac8d0bbeb719fe26daa4058e1c5
 {{{
 Author: Simon Peyton Jones simo...@microsoft.com
 Date:   Thu Sep 29 09:45:42 2011 +0100

 Make Outputable.quotes do what the comments say

 Outputable.quotes claimed to drop the quotes if the enclosed thing has
 a trailing single quote; but its implementation checked for
 a *leading* quote.

 Fixes Trac #5509

  compiler/utils/Outputable.lhs |9 +
  1 files changed, 5 insertions(+), 4 deletions(-)
 }}}

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5509#comment:3
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


Re: [GHC] #5509: quotes pretty-printer not working as comments specify

2011-09-29 Thread GHC
#5509: quotes pretty-printer not working as comments specify
+---
  Reporter:  mgsloan1   |  Owner:   
   
  Type:  bug| Status:  closed   
   
  Priority:  normal |  Milestone:   
   
 Component:  Compiler   |Version:  7.2.1
   
Resolution:  fixed  |   Keywords:  prettyprint  
   
  Testcase: |  Blockedby:   
   
Difficulty: | Os:  
Unknown/Multiple
  Blocking: |   Architecture:  
Unknown/Multiple
   Failure:  Incorrect warning at compile-time  |  
+---
Changes (by simonpj):

  * status:  new = closed
  * resolution:  = fixed


Comment:

 Done.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5509#comment:4
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


Re: [GHC] #5509: quotes pretty-printer not working as comments specify

2011-09-29 Thread GHC
#5509: quotes pretty-printer not working as comments specify
+---
  Reporter:  mgsloan1   |  Owner:   
   
  Type:  bug| Status:  closed   
   
  Priority:  normal |  Milestone:   
   
 Component:  Compiler   |Version:  7.2.1
   
Resolution:  fixed  |   Keywords:  prettyprint  
   
  Testcase: |  Blockedby:   
   
Difficulty: | Os:  
Unknown/Multiple
  Blocking: |   Architecture:  
Unknown/Multiple
   Failure:  Incorrect warning at compile-time  |  
+---

Comment(by igloo):

 Would it make more sense to never quote identifiers?

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5509#comment:5
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


Re: [GHC] #5509: quotes pretty-printer not working as comments specify

2011-09-29 Thread GHC
#5509: quotes pretty-printer not working as comments specify
+---
  Reporter:  mgsloan1   |  Owner:   
   
  Type:  bug| Status:  closed   
   
  Priority:  normal |  Milestone:   
   
 Component:  Compiler   |Version:  7.2.1
   
Resolution:  fixed  |   Keywords:  prettyprint  
   
  Testcase: |  Blockedby:   
   
Difficulty: | Os:  
Unknown/Multiple
  Blocking: |   Architecture:  
Unknown/Multiple
   Failure:  Incorrect warning at compile-time  |  
+---

Comment(by mgsloan1):

 -- 'quotes' encloses something in single quotes...

 hehe, 'nice'.  Thanks for the quick fix!

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5509#comment:6
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


Re: [GHC] #5509: quotes pretty-printer not working as comments specify

2011-09-28 Thread GHC
#5509: quotes pretty-printer not working as comments specify
-+--
Reporter:  mgsloan1  |Owner:
   
Type:  bug   |   Status:  new   
   
Priority:  normal|Milestone:
   
   Component:  Compiler  |  Version:  7.2.1 
   
Keywords:  prettyprint   | Testcase:
   
   Blockedby:|   Difficulty:
   
  Os:  Unknown/Multiple  | Blocking:
   
Architecture:  Unknown/Multiple  |  Failure:  Incorrect warning at 
compile-time
-+--

Comment(by simonpj):

 Malcolm Wallace writes:
 I was bitten by this bug the other day.  The code I was modifying had
 values called
 {{{
 foo
 foo'
 foo''
 }}}
 and a type error message told me there was a fault with
 {{{
`foo''
 }}}
 so I ended up looking in entirely the wrong place for five minutes.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5509#comment:1
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


Re: [GHC] #5509: quotes pretty-printer not working as comments specify

2011-09-28 Thread GHC
#5509: quotes pretty-printer not working as comments specify
-+--
Reporter:  mgsloan1  |Owner:
   
Type:  bug   |   Status:  new   
   
Priority:  normal|Milestone:
   
   Component:  Compiler  |  Version:  7.2.1 
   
Keywords:  prettyprint   | Testcase:
   
   Blockedby:|   Difficulty:
   
  Os:  Unknown/Multiple  | Blocking:
   
Architecture:  Unknown/Multiple  |  Failure:  Incorrect warning at 
compile-time
-+--

Comment(by simonpj):

 I'm inclined to fix the existing bug, even though it makes mgsloan1's job
 harder.  (But not much harder!)

 S

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5509#comment:2
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


Re: [GHC] #5509: quotes pretty-printer not working as comments specify

2011-09-27 Thread Malcolm Wallace
 From compiler/utils/Outputable.lhs
 {{{
 -- quotes encloses something in single quotes...
 -- but it omits them if the thing ends in a single quote
 -- so that we don't get `foo''.  Instead we just have foo'.
 quotes d = SDoc $ \sty -
let pp_d = runSDoc d sty in
case show pp_d of
  ('\'' : _) - pp_d
  _other - Pretty.quotes pp_d
 }}}
 
 This implementation does not match the comment - the code is checking for
 a leading single-quote, not for a trailing one.

I was bitten by this bug the other day.  The code I was modifying had values 
called
foo
foo'
foo''

and a type error message told me there was a fault with
   `foo''

so I ended up looking in entirely the wrong place for five minutes.

Regards,
Malcolm


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


[GHC] #5509: quotes pretty-printer not working as comments specify

2011-09-26 Thread GHC
#5509: quotes pretty-printer not working as comments specify
-+--
Reporter:  mgsloan1  |   Owner: 
  
Type:  bug   |  Status:  new
  
Priority:  normal|   Component:  Compiler   
  
 Version:  7.2.1 |Keywords:  prettyprint
  
Testcase:|   Blockedby: 
  
  Os:  Unknown/Multiple  |Blocking: 
  
Architecture:  Unknown/Multiple  | Failure:  Incorrect warning at 
compile-time
-+--
 I am currently working on a parser for GHC error messages, and would
 actually prefer that this remain unfixed, as this would make GHC error
 messages slightly harder to parse.

 From compiler/utils/Outputable.lhs
 {{{
 -- quotes encloses something in single quotes...
 -- but it omits them if the thing ends in a single quote
 -- so that we don't get `foo''.  Instead we just have foo'.
 quotes d = SDoc $ \sty -
let pp_d = runSDoc d sty in
case show pp_d of
  ('\'' : _) - pp_d
  _other - Pretty.quotes pp_d
 }}}

 This implementation does not match the comment - the code is checking for
 a leading single-quote, not for a trailing one.  Therefore the following
 code does result in the {{{ `foo'' }}} that the comment specifically
 mentions:

 {{{
 foo' :: (Show a) = a - IO ()
 foo' = print
 main = foo' print
 }}}

 {{{
 Test.hs:3:8:
 No instance for (Show (a0 - IO ()))
   arising from a use of `foo''
 Possible fix: add an instance declaration for (Show (a0 - IO ()))
 In the expression: foo' print
 In an equation for `main': main = foo' print
 }}}

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5509
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