#16188: GHC HEAD-only panic (buildKindCoercion) -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.8.1 Component: Compiler (Type | Version: 8.7 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): Here's what you get when you compile the program with `-dcore-lint`: {{{ $ ~/Software/ghc4/inplace/bin/ghc-stage2 Bug.hs -dcore-lint [1 of 1] Compiling Bug ( Bug.hs, Bug.o ) *** Core Lint errors : in result of Desugar (before optimization) *** <no location info>: warning: [RHS of ds_d1ur :: (Sing Any, Sing (ReNotEmpty re2_a1hm))] The type of this binder doesn't match the type of its RHS: ds_d1ur Binder's type: (Sing Any, Sing (ReNotEmpty re2_a1hm)) Rhs type: (Sing (Apply ReNotEmptySym0 re1_a1hl), Sing (ReNotEmpty re2_a1hm)) *** Offending Program *** <elided> blah :: forall t (re :: RegExp t). Sing re -> () [LclIdX] blah = \ (@ t_a1hg) (@ (re_a1hh :: RegExp t_a1hg)) (ds_d1uq :: Sing re_a1hh) -> let { ds_d1vi :: R:SingRegExp t_a1hg re_a1hh [LclId] ds_d1vi = ds_d1uq `cast` (D:R:SingRegExp0[0] <t_a1hg>_N <re_a1hh>_N :: Sing re_a1hh ~R# R:SingRegExp t_a1hg re_a1hh) } in case ds_d1vi of wild_00 { SApp @ re1_a1hl @ re2_a1hm co_a1hn sre1_aXI sre2_aXJ -> let { ds_d1ur :: (Sing Any, Sing (ReNotEmpty re2_a1hm)) [LclId] ds_d1ur = (sReNotEmpty @ t_a1hg @ re1_a1hl sre1_aXI, (sReNotEmpty @ t_a1hg @ re2_a1hm sre2_aXJ) `cast` (Sub (Sym (Sing <Bool>_N (Sym (D:R:ApplyRegExpBoolReNotEmptySym0r[0] <t_a1hg>_N <re2_a1hm>_N)))_N) :: Sing (Apply ReNotEmptySym0 re2_a1hm) ~R# Sing (ReNotEmpty re2_a1hm))) } in let { fail_d1v2 :: Void# -> () [LclId] fail_d1v2 = \ (ds_d1v3 [OS=OneShot] :: Void#) -> patError @ 'LiftedRep @ () "Bug.hs:(47,5)-(48,26)|case"# } in case ds_d1ur of wild_00 { (ds_d1uY, ds_d1uZ) -> let { ds_d1v0 :: R:SingBool Any [LclId] ds_d1v0 = ds_d1uY `cast` (D:R:SingBool0[0] <Any>_N :: Sing Any ~R# R:SingBool Any) } in case ds_d1v0 of wild_00 { __DEFAULT -> fail_d1v2 void#; STrue co_a1hA -> let { ds_d1v1 :: R:SingBool Any [LclId] ds_d1v1 = ds_d1uZ `cast` (D:R:SingBool0[0] <Any>_N :: Sing Any ~R# R:SingBool Any) } in case ds_d1v1 of wild_00 { __DEFAULT -> fail_d1v2 void#; STrue co_a1hD -> () } } } } }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16188#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler