Skip to content

panic: Given constraint without given origin

Summary

During compilation of a backpack heavy library I get the following error:

<no location info>: error:
    panic! (the 'impossible' happened)
  GHC version 9.6.2:
	Given constraint without given origin
  $dApplicative_aafq
  arising when attempting to show that
  instance [safe] Applicative m => Applicative (CommandM m)
    -- Defined in ‘Ghengin.Vulkan.Renderer.Command’
  is provided by ‘Ghengin.Vulkan.Renderer.Command’
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/GHC/Utils/Panic.hs:189:37 in ghc:GHC.Utils.Panic
        pprPanic, called at compiler/GHC/Tc/Solver/Canonical.hs:600:31 in ghc:GHC.Tc.Solver.Canonical
  CallStack (from HasCallStack):
    panic, called at compiler/GHC/Utils/Error.hs:454:29 in ghc:GHC.Utils.Error

Unfortunately, my reproducer is far from minimal. It's reproducible by cloning at a particular commit a considerably large project... Nonetheless, I figured I should report it.

Steps to reproduce

git clone https://github.com/alt-romes/ghengin.git && cd ghengin
git checkout 2e007f0c9bf88018db424d11c96b2de9b0b4d14a
cabal build ghengin-core

Environment

  • GHC version used: 9.6.2

Optional:

  • Operating System: macOS
  • System Architecture: M2 / Aarch64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information