Ticket #7614 (closed bug: duplicate)

Opened 4 months ago

Last modified 4 months ago

tc_hs_type: bang : The impossible happened

Reported by: erikd Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

A simple data structure with bang patterns like the following:

data MyType
    = MyType
        { a :: !Int
        , b :: !Maybe Int
        }

results in:

ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.1 for x86_64-unknown-linux):
        tc_hs_type: bang

Adding parentheses around the "Maybe Int" like this:

data MyType
    = MyType
        { a :: !Int
        , b :: !(Maybe Int)
        }

is accepted, but it would be nice if the former example printed a syntax error or some sort of other warning rather than just a panic.

Change History

Changed 4 months ago by simonpj

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to duplicate

Thanks. It's a dup of #7210. Happily HEAD says

T7614.hs:6:17:
    Unexpected strictness annotation: !Maybe
    In the type `!Maybe Int'
    In the definition of data constructor `MyType'
    In the data declaration for `MyType'

I think this is ok.

Simon

Note: See TracTickets for help on using tickets.