[GHC] #10615: Panic; no skolem info (partial type signatures)
#10615: Panic; no skolem info (partial type signatures) -------------------------------------+------------------------------------- Reporter: holzensp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- This rather minimal program {{{#!hs f :: _ => _f f = const }}} results in this: {{{ GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( Panic.hs, interpreted ) Panic.hs:1:6: Found hole ‘_’ with inferred constraints: () To use the inferred type, enable PartialTypeSignatures In the type signature for ‘f’: _ => _f Panic.hs:2:5: Couldn't match expected type ‘_f’ with actual type ‘a0 -> b0 -> a0’ ‘_f’ is untouchable inside the constraints () bound by the inferred type of f :: _f at Panic.hs:2:1-9ghc: panic! (the 'impossible' happened) (GHC version 7.10.1 for x86_64-apple-darwin): No skolem info: _f_alF[sk] }}} The newest open bugs (that reporter could find at the time of reporting) with "no skolem info" in their description are #10404 and #10432. The newest bug (which is closed) is #10503. It seems likely, though, that the above comes from the PartialTypeSignatures implementation (considering the simplicity of the repro). -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10615> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10615: Panic; no skolem info (partial type signatures) -------------------------------------+------------------------------------- Reporter: holzensp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by holzensp): BTW, actually turning on ```PartialTypeSignatures``` gives the expected output: {{{ GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Test ( Test.hs, interpreted ) Test.hs:47:6: Warning: Found hole ‘_f’ with type: a -> b -> a Where: ‘a’ is a rigid type variable bound by the inferred type of f :: a -> b -> a at Test.hs:48:1 ‘b’ is a rigid type variable bound by the inferred type of f :: a -> b -> a at Test.hs:48:1 In the type signature for ‘f’: _f Ok, modules loaded: Test. *Test> :r [1 of 1] Compiling Test ( Test.hs, interpreted ) Test.hs:47:6: Warning: Found hole ‘_’ with inferred constraints: () In the type signature for ‘f’: _ => _f Test.hs:47:11: Warning: Found hole ‘_f’ with type: a -> b -> a Where: ‘a’ is a rigid type variable bound by the inferred type of f :: a -> b -> a at Test.hs:48:1 ‘b’ is a rigid type variable bound by the inferred type of f :: a -> b -> a at Test.hs:48:1 In the type signature for ‘f’: _ => _f Ok, modules loaded: Test. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10615#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10615: Panic; no skolem info (partial type signatures) -------------------------------------+------------------------------------- Reporter: holzensp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"953648127cea2836ec134b03a966695ac0b36434/ghc" 95364812/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="953648127cea2836ec134b03a966695ac0b36434" Tidy up and refactor wildcard handling When examining #10615, I found the wildcard handling hard to understand. This patch refactors quite a bit, but with no real change in behaviour. * Split out TcIdSigInfo from TcSigInfo, as a separate type, like TcPatSynInfo. * Make TcIdSigInfo express more invariants by pushing the wildard info into TcIdSigBndr * Remove all special treatment of unification variables that arise from wildcards; so the TauTv of TcType.MetaInfo loses its Bool argument. A ton of konck on changes. The result is significantly simpler, I think. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10615#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10615: Panic; no skolem info (partial type signatures) -------------------------------------+------------------------------------- Reporter: holzensp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"28096b274a3803b8a479c5dd94ebda655a15566c/ghc" 28096b2/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="28096b274a3803b8a479c5dd94ebda655a15566c" Fix quantification for inference with sigs When we are *inferring* the type of a let-bound function, we might still have a type signature. And we must be sure to quantify over its type variables, else you get the crash in Trac #10615. See Note [Which type variables to quantify] in TcSimplify }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10615#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10615: Panic; no skolem info (partial type signatures) -------------------------------------+------------------------------------- Reporter: holzensp | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: partial- | sigs/should_fail/T10615 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => partial-sigs/should_fail/T10615 * status: new => closed * resolution: => fixed Comment: Thanks for the great bug report. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10615#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC