Ticket #5490 (closed bug: fixed)

Opened 21 months ago

Last modified 21 months ago

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 Difficulty:
Test Case: typecheck/should_compile/T5490 Blocked By:
Blocking: Related Tickets:

Description

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
                                                 (GHC.Types.Int
                                                  Bug.:* ([GHC.Types.Char] Bug.:* Bug.HNil))]
...

Attachments

Bug.hs Download (9.1 KB) - added by mikhail.vorozhtsov 21 months ago.

Change History

Changed 21 months ago by mikhail.vorozhtsov

Changed 21 months ago by simonpj@…

commit c782840fb75711f5e80f313efbeea0bd7f817f0b

Author: Simon Peyton Jones <simonpj@microsoft.com>
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(-)

Changed 21 months ago by simonpj

  • status changed from new to closed
  • testcase set to typecheck/should_compile/T5490
  • resolution set to fixed

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.

Simon

Changed 21 months 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.