[GHC] #9834: GHC panic when used with deferred type errors

#9834: GHC panic when used with deferred type errors -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.8.2 checker) | Operating System: Linux Keywords: | Type of failure: GHCi crash Architecture: Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Differential Revisions: Related Tickets: | -------------------------------------+------------------------------------- Attached code panics when run with `-fdefer-type-errors`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9834 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9834: GHC panic when used with deferred type errors -------------------------------------+------------------------------------- Reporter: | Owner: Iceland_jack | Status: new Type: bug | Milestone: Priority: normal | Version: 7.8.2 Component: Compiler | Keywords: (Type checker) | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: Linux | Blocked By: Type of failure: GHCi crash | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Description changed by Iceland_jack: Old description:
Attached code panics when run with `-fdefer-type-errors`.
New description: Attached code panics when run with `-fdefer-type-errors`. '''Edit:''' Code should not type check but it should not cause a panic either :) -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9834#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9834: GHC panic when used with deferred type errors -------------------------------------+------------------------------------- Reporter: | Owner: Iceland_jack | Status: new Type: bug | Milestone: Priority: normal | Version: 7.8.2 Component: Compiler | Keywords: (Type checker) | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: Linux | Blocked By: Type of failure: GHCi crash | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by simonpj): Works fine in HEAD. Can someone try the 7.8.4 branch? Here are the HEAD error messages. I have not looked at them, but there is no crash. {{{ T9834.hs:24:10: Warning: Couldn't match type ‘p’ with ‘(->) (p a0)’ ‘p’ is a rigid type variable bound by the class declaration for ‘ApplicativeFix’ at T9834.hs:22:39 Expected type: (forall (q :: * -> *). Applicative q => Comp p q a -> Comp p q a) -> p a Actual type: (forall (q :: * -> *). Applicative q => Nat (Comp p q) (Comp p q)) -> p a0 -> p a0 Relevant bindings include afix :: (forall (q :: * -> *). Applicative q => Comp p q a -> Comp p q a) -> p a (bound at T9834.hs:24:3) In the expression: wrapIdComp In an equation for ‘afix’: afix = wrapIdComp T9834.hs:24:10: Warning: Couldn't match type ‘a’ with ‘p a0’ ‘a’ is a rigid type variable bound by the type signature for afix :: (forall (q :: * -> *). Applicative q => Comp p q a -> Comp p q a) -> p a at T9834.hs:23:11 Expected type: (forall (q :: * -> *). Applicative q => Comp p q a -> Comp p q a) -> p a Actual type: (forall (q :: * -> *). Applicative q => Nat (Comp p q) (Comp p q)) -> p a0 -> p a0 Relevant bindings include afix :: (forall (q :: * -> *). Applicative q => Comp p q a -> Comp p q a) -> p a (bound at T9834.hs:24:3) In the expression: wrapIdComp In an equation for ‘afix’: afix = wrapIdComp T9834.hs:24:10: Warning: Couldn't match type ‘a’ with ‘a1’ ‘a’ is a rigid type variable bound by the type signature for afix :: (forall (q :: * -> *). Applicative q => Comp p q a -> Comp p q a) -> p a at T9834.hs:23:11 ‘a1’ is a rigid type variable bound by a type expected by the context: Applicative q => Comp p q a1 -> Comp p q a1 at T9834.hs:24:10 Expected type: Comp p q a1 -> Comp p q a1 Actual type: Comp p q a -> Comp p q a Relevant bindings include afix :: (forall (q :: * -> *). Applicative q => Comp p q a -> Comp p q a) -> p a (bound at T9834.hs:24:3) In the expression: wrapIdComp In an equation for ‘afix’: afix = wrapIdComp }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9834#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9834: GHC panic when used with deferred type errors -------------------------------------+------------------------------------- Reporter: | Owner: Iceland_jack | Status: new Type: bug | Milestone: Priority: normal | Version: 7.8.2 Component: Compiler | Keywords: (Type checker) | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: Linux | Blocked By: Type of failure: GHCi crash | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by jstolarek): I just checked and I'm getting a panic on my branch forked from HEAD 5 days ago. So if the fix indeed went into HEAD it must be really recent. I tried cherry-picking 2cc854b7133e38c7ad1107057931761782d03594 onto my branch because it does typed-holes-related stuff but that doesn't fix the panic. I also confirmed that this happens with GHC 7.8.4: Aside: To get the reported test case compiling with HEAD I had to change `import Control.Monad.Identity` to `import Data.Functor.Identity`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9834#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9834: GHC panic when used with deferred type errors
-------------------------------------+-------------------------------------
Reporter: | Owner:
Iceland_jack | Status: new
Type: bug | Milestone:
Priority: normal | Version: 7.8.2
Component: Compiler | Keywords:
(Type checker) | Architecture: Unknown/Multiple
Resolution: | Difficulty: Unknown
Operating System: Linux | Blocked By:
Type of failure: GHCi crash | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#9834: GHC panic when used with deferred type errors -------------------------------------+------------------------------------- Reporter: | Owner: Iceland_jack | Status: new Type: bug | Milestone: Priority: normal | Version: 7.8.2 Component: Compiler | Keywords: (Type checker) | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: Linux | Blocked By: Type of failure: GHCi crash | Related Tickets: Test Case: | typecheck/should_compile/T9834 | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => typecheck/should_compile/T9834 Comment: OK well maybe it is recent, but at least it works now. I've added the module as a regression test. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9834#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9834: GHC panic when used with deferred type errors -------------------------------------+------------------------------------- Reporter: | Owner: Iceland_jack | Status: closed Type: bug | Milestone: Priority: normal | Version: 7.8.2 Component: Compiler | Keywords: (Type checker) | Architecture: Unknown/Multiple Resolution: fixed | Difficulty: Unknown Operating System: Linux | Blocked By: Type of failure: GHCi crash | Related Tickets: Test Case: | typecheck/should_compile/T9834 | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed Comment: I'll close this, because I think it unlikely we'll ever do 7.8.5 and we don't know what to merge across even if we did. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9834#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC