[GHC] #12844: No Skolem Info with PartialTypeSignatures
#12844: No Skolem Info with PartialTypeSignatures -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | 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: -------------------------------------+------------------------------------- The following program triggers a panic: {{{ {-# LANGUAGE DataKinds #-} {-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} barWraper :: ('(r,r') ~ Head rngs, Foo rngs) => FooData rngs barWraper = bar bar :: (_) => FooData rngs bar = foo data FooData rngs class Foo xs where foo :: (Head xs ~ '(r,r')) => FooData xs type family Head (xs :: [k]) where Head (x ': xs) = x }}} {{{
ghci NoSkolem.hs [1 of 1] Compiling Main ( NoSkolem.hs, NoSkolem.o )
NoSkolem.hs:8:13: error:ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): No skolem info: k_aYV[sk] }}} I haven't tested with 8.0.2 or head. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12844> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12844: No Skolem Info with PartialTypeSignatures -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: 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 Simon Peyton Jones <simonpj@…>): In [changeset:"1bfff60fc57cd564382b86bdfb1f2764ca15d44f/ghc" 1bfff60f/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="1bfff60fc57cd564382b86bdfb1f2764ca15d44f" Fix inference of partial signatures When we had f :: ( _ ) => blah we were failing to call growThetaTyVars, as we do in the no-type-signature case, and that meant that we weren't generalising over the right type variables. I'm quite surprised this didn't cause problems earlier. Anyway Trac #12844 showed it up and this patch fixes it }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12844#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12844: No Skolem Info with PartialTypeSignatures -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: partial- crash or panic | sigs/should_compile/T12844 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => merge * testcase: => partial-sigs/should_compile/T12844 Comment: This fix is fairly simple and might be worth merging to 8.0. Try, anyway. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12844#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12844: No Skolem Info with PartialTypeSignatures -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: partial- crash or panic | sigs/should_compile/T12844 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed * milestone: => 8.0.2 @@ -3,1 +3,1 @@ - {{{ + {{{#!hs New description: The following program triggers a panic: {{{#!hs {-# LANGUAGE DataKinds #-} {-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} barWraper :: ('(r,r') ~ Head rngs, Foo rngs) => FooData rngs barWraper = bar bar :: (_) => FooData rngs bar = foo data FooData rngs class Foo xs where foo :: (Head xs ~ '(r,r')) => FooData xs type family Head (xs :: [k]) where Head (x ': xs) = x }}} {{{
ghci NoSkolem.hs [1 of 1] Compiling Main ( NoSkolem.hs, NoSkolem.o )
NoSkolem.hs:8:13: error:ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): No skolem info: k_aYV[sk] }}} I haven't tested with 8.0.2 or head. -- Comment: Merged to `ghc-8.0` as 4212674ba92971734eec064809f8e1a45bca992a. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12844#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC