Opened 3 years ago

Closed 3 years ago

#5496 closed bug (invalid)

Reify class instances

Reported by: zzo38 Owned by:
Priority: normal Milestone:
Component: Template Haskell Version: 7.0.3
Keywords: Cc:
Operating System: Windows Architecture: x86
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by simonpj)

    Exception when trying to run compile-time code:
      <interactive>: panic! (the 'impossible' happened)
  (GHC version 7.0.3 for i386-unknown-mingw32):
        reifyType PredTy
    <pred>base:GHC.Num.Num{tc 2b}
            integer-gmp:GHC.Integer.Type.Integer{tc 314}

Please report this as a GHC bug:

      Code: (>>)
                  classInstances 'Num [Language.Haskell.TH.Syntax.ConT 'Integer]

                  (.) reify head
                (.) runIO print
              [| 0 |]
    In the expression:
      $(classInstances 'Num [ConT 'Integer] >>= reify . head
    >>= runIO . print
    [| 0 |])
    In an equation for `it':
          = $(classInstances 'Num [ConT 'Integer] >>= reify . head
          >>= runIO . print
          [| 0 |])

Change History (2)

comment:1 Changed 3 years ago by simonpj

  • Description modified (diff)

comment:2 Changed 3 years ago by simonpj

  • Resolution set to invalid
  • Status changed from new to closed

Thanks. classInstances ahs been replaced by reifyInstances which returns [Dec] rather than [Name], so this bug has, in effect, gone away.


Note: See TracTickets for help on using tickets.