panic! no skolem info when using typed template haskell
Summary
When using typed template haskell with equality constraints GHC panics.
Steps to reproduce
{-# LANGUAGE TemplateHaskell #-}
module A where
import Language.Haskell.TH
bomb :: Code Q Int
bomb = [||1||]
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE GADTs #-}
module B where
import A
boom :: (a ~ Int) => a
boom = $$(bomb)
Expected behavior
GHC should not panic.
Environment
- GHC version used: 9.2.3
Optional:
- Operating System: NixOS
- System Architecture: x86_64