Opened 7 days ago

Closed 6 days ago

Last modified 6 days ago

#14803 closed bug (duplicate)

Panic during desugaring I think

Reported by: justus Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.2.2
Keywords: PatternSynonyms Cc:
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #14326 Differential Rev(s):
Wiki Page:

Description

This is the panic message itself

ghc: panic! (the 'impossible' happened)
  (GHC version 8.2.2 for x86_64-apple-darwin):
	mkOneConFull: Not TyConApp:
  bndType_aeGK
  Call stack:
      CallStack (from HasCallStack):
        prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
        callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable
        pprPanic, called at compiler/deSugar/Check.hs:976:30 in ghc:Check

And these are the options I use to compile:

  • -Wall
  • -Wall
  • -Wcompat
  • -Wincomplete-record-updates
  • -Wincomplete-uni-patterns
  • -Wredundant-constraints

This is the file I am trying to compile https://github.com/ohua-dev/ohua-core/blob/master/src/Ohua/ALang/Passes.hs. Unfortunately the error message tells me very little about where the error actually occurs, but the bndType variables are generally used in the family of AExpr types defined here https://github.com/ohua-dev/ohua-core/blob/master/src/Ohua/ALang/Lang.hs#L141. To get the power of recursion-schemes all expression types are implemented on a variation of the base functor AExprF and then newtypes are used to create individual expression types.

If anyone has an idea as to how I could create a minimal example for you guys feel free to tell me and I'll see what I can do.

Change History (2)

comment:1 Changed 6 days ago by RyanGlScott

Keywords: PatternSynonyms added
Resolution: duplicate
Status: newclosed

Thanks for the bug report. This is a duplicate of #14326, which has been fixed in GHC 8.4.1.

This bug could be tickled when you nest pattern-synonym pattern matches in just the right way.

comment:2 Changed 6 days ago by justus

Ah. Sorry I did not see that duplicate. I tried searching for it but was unsuccessful.

Now I'll have to add CPP to the COMPLETE pragmas in my code :(

Note: See TracTickets for help on using tickets.