> 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
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs