Opened 5 years ago

Closed 5 years ago

#9428 closed bug (duplicate)

Pretty printer bad formatting

Reported by: terrelln Owned by:
Priority: lowest Milestone:
Component: Compiler Version: 7.6.3
Keywords: pretty print Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: #8403 Differential Rev(s):
Wiki Page:

Description

When compiling with -fwarn-incomplete-patterns, the first test case s17.hs (attached) outputs unmatched patterns correctly.

test.hs:4:1: Warning:
    Pattern match(es) are non-exhaustive
    In an equation for `f':
        Patterns not matched:
            B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _
            B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ A B
            B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ A B B _
            B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ B _ A B A B
            ...

However, when compiling s18.hs each argument is printed on its own line. 16 lines of the output are included below.

test.hs:4:1: Warning:
    Pattern match(es) are non-exhaustive
    In an equation for `f':
        Patterns not matched:
            B
            _
            B
            _
            B
            _
            B
            _
            B
            _
            B
            _

Attachments (2)

s17.hs (1.6 KB) - added by terrelln 5 years ago.
s17.hs
s18.hs (1.7 KB) - added by terrelln 5 years ago.
s18.hs

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by terrelln

Attachment: s17.hs added

s17.hs

Changed 5 years ago by terrelln

Attachment: s18.hs added

s18.hs

comment:1 Changed 5 years ago by thomie

Component: DriverCompiler
Resolution: duplicate
Status: newclosed

This seems like another instance of #8403 (Pretty-printing of long types). I added a link back to this ticket from there.

terrelln: thanks for the bug report. Please reopen if you disagree.

Note: See TracTickets for help on using tickets.