Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5490 closed bug (fixed)

Core lint error after desugaring

Reported by: mikhail.vorozhtsov Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: typecheck/should_compile/T5490
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I was investigating a "PAP object entered!" crash and found out that almost every module in my program fails to compile with -dcore-lint. I'll attach a reduced test case that reproduces the issue:

$ ghc-7.3.20110912 -fforce-recomp -dcore-lint Bug.hs
[1 of 1] Compiling Bug              ( Bug.hs, Bug.o )
*** Core Lint errors : in result of Desugar ***
{-# LINE 113 "Bug.hs #-}:
    [in body of lambda with binder temp_ahE :: Bug.HElemOf
                                                  Bug.:* ([GHC.Types.Char] Bug.:* Bug.HNil))]

Attachments (1)

Bug.hs (9.1 KB) - added by mikhail.vorozhtsov 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by mikhail.vorozhtsov

Attachment: Bug.hs added

comment:1 Changed 6 years ago by simonpj@…

commit c782840fb75711f5e80f313efbeea0bd7f817f0b

Author: Simon Peyton Jones <>
Date:   Fri Sep 16 09:59:37 2011 +0100

    Correct a back-to-front coercion (fixes Trac #5490)
    This bug has been present for ages, but it only shows up in view
    patterns where coercions are also involved.  Easy to fix!

 compiler/typecheck/TcPat.lhs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

comment:2 Changed 6 years ago by simonpj

Resolution: fixed
Status: newclosed
Test Case: typecheck/should_compile/T5490

Thank you! I can't forsee all the consequences of this bug on execution. Can you try with HEAD, and see whether it works for you? Your plan is right: always start by compiling everything with -dcore-lint.


comment:3 Changed 6 years ago by mikhail.vorozhtsov

Thanks for fixing this so quick. My program now compiles with -dcore-lint. It turns out that the original issue has nothing to do with this compiler error though, so I filed another ticket, #5494.

Note: See TracTickets for help on using tickets.