[GHC] #15505: Assertion failure in test T7224

#15505: Assertion failure in test T7224 -------------------------------------+------------------------------------- Reporter: osa1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.5 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- To reproduce, build GHC HEAD with slow validate settings, then run test `T7224`. Output: {{{ =====> T7224(normal) 9 of 15 [0, 2, 0] cd "polykinds/T7224.run" && "/home/omer/haskell/ghc/inplace/test spaces /ghc-stage2" -c T7224.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-output Actual stderr output differs from expected: diff -uw "polykinds/T7224.run/T7224.stderr.normalised" "polykinds/T7224.run/T7224.comp.stderr.normalised" --- polykinds/T7224.run/T7224.stderr.normalised 2018-08-11 13:33:16.874459507 +0300 +++ polykinds/T7224.run/T7224.comp.stderr.normalised 2018-08-11 13:33:16.874459507 +0300 @@ -1,13 +1,11 @@ +ghc: panic! (the 'impossible' happened) + (GHC version 8.7.20180809 for x86_64-unknown-linux): + ASSERT failed! + Type-correct unfilled coercion hole {co_asw} + Call stack: + CallStack (from HasCallStack): + callStackDoc, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + pprPanic, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + assertPprPanic, called at compiler/typecheck/TcHsSyn.hs:<line>:<column> in <package-id>:TcHsSyn -T7224.hs:6:19: - Expected kind ‘i’, but ‘i’ has kind ‘*’ - In the first argument of ‘m’, namely ‘i’ - In the type signature: ret' :: a -> m i i a - In the class declaration for ‘PMonad'’ - -T7224.hs:7:14: - Expected kind ‘i’, but ‘i’ has kind ‘*’ - In the first argument of ‘m’, namely ‘i’ - In the type signature: - bind' :: m i j a -> (a -> m j k b) -> m i k b - In the class declaration for ‘PMonad'’ +Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug *** unexpected failure for T7224(normal) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15505 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15505: Assertion failures in tests T7224 and T9201 -------------------------------------+------------------------------------- Reporter: osa1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler (Type | Version: 8.5 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by osa1: Old description:
To reproduce, build GHC HEAD with slow validate settings, then run test `T7224`. Output:
{{{ =====> T7224(normal) 9 of 15 [0, 2, 0] cd "polykinds/T7224.run" && "/home/omer/haskell/ghc/inplace/test spaces/ghc-stage2" -c T7224.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-output Actual stderr output differs from expected: diff -uw "polykinds/T7224.run/T7224.stderr.normalised" "polykinds/T7224.run/T7224.comp.stderr.normalised" --- polykinds/T7224.run/T7224.stderr.normalised 2018-08-11 13:33:16.874459507 +0300 +++ polykinds/T7224.run/T7224.comp.stderr.normalised 2018-08-11 13:33:16.874459507 +0300 @@ -1,13 +1,11 @@ +ghc: panic! (the 'impossible' happened) + (GHC version 8.7.20180809 for x86_64-unknown-linux): + ASSERT failed! + Type-correct unfilled coercion hole {co_asw} + Call stack: + CallStack (from HasCallStack): + callStackDoc, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + pprPanic, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + assertPprPanic, called at compiler/typecheck/TcHsSyn.hs:<line>:<column> in <package-id>:TcHsSyn
-T7224.hs:6:19: - Expected kind ‘i’, but ‘i’ has kind ‘*’ - In the first argument of ‘m’, namely ‘i’ - In the type signature: ret' :: a -> m i i a - In the class declaration for ‘PMonad'’ - -T7224.hs:7:14: - Expected kind ‘i’, but ‘i’ has kind ‘*’ - In the first argument of ‘m’, namely ‘i’ - In the type signature: - bind' :: m i j a -> (a -> m j k b) -> m i k b - In the class declaration for ‘PMonad'’ +Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug *** unexpected failure for T7224(normal) }}}
New description: To reproduce, build GHC HEAD with slow validate settings, then run the tests. Outputs: {{{ =====> T7224(normal) 9 of 15 [0, 2, 0] cd "polykinds/T7224.run" && "/home/omer/haskell/ghc/inplace/test spaces /ghc-stage2" -c T7224.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-output Actual stderr output differs from expected: diff -uw "polykinds/T7224.run/T7224.stderr.normalised" "polykinds/T7224.run/T7224.comp.stderr.normalised" --- polykinds/T7224.run/T7224.stderr.normalised 2018-08-11 13:33:16.874459507 +0300 +++ polykinds/T7224.run/T7224.comp.stderr.normalised 2018-08-11 13:33:16.874459507 +0300 @@ -1,13 +1,11 @@ +ghc: panic! (the 'impossible' happened) + (GHC version 8.7.20180809 for x86_64-unknown-linux): + ASSERT failed! + Type-correct unfilled coercion hole {co_asw} + Call stack: + CallStack (from HasCallStack): + callStackDoc, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + pprPanic, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + assertPprPanic, called at compiler/typecheck/TcHsSyn.hs:<line>:<column> in <package-id>:TcHsSyn -T7224.hs:6:19: - Expected kind ‘i’, but ‘i’ has kind ‘*’ - In the first argument of ‘m’, namely ‘i’ - In the type signature: ret' :: a -> m i i a - In the class declaration for ‘PMonad'’ - -T7224.hs:7:14: - Expected kind ‘i’, but ‘i’ has kind ‘*’ - In the first argument of ‘m’, namely ‘i’ - In the type signature: - bind' :: m i j a -> (a -> m j k b) -> m i k b - In the class declaration for ‘PMonad'’ +Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug *** unexpected failure for T7224(normal) =====> T9201(normal) 11 of 15 [0, 3, 0] cd "typecheck/should_fail/T9201.run" && "/home/omer/haskell/ghc/inplace/test spaces/ghc-stage2" -c T9201.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed- specialisations -fshow-warning-groups -fdiagnostics-color=never -fno- diagnostics-show-caret -dno-debug-output Actual stderr output differs from expected: diff -uw "typecheck/should_fail/T9201.run/T9201.stderr.normalised" "typecheck/should_fail/T9201.run/T9201.comp.stderr.normalised" --- typecheck/should_fail/T9201.run/T9201.stderr.normalised 2018-08-11 13:33:21.058404868 +0300 +++ typecheck/should_fail/T9201.run/T9201.comp.stderr.normalised 2018-08-11 13:33:21.058404868 +0300 @@ -1,7 +1,11 @@ +ghc: panic! (the 'impossible' happened) + (GHC version 8.7.20180809 for x86_64-unknown-linux): + ASSERT failed! + Type-correct unfilled coercion hole {co_asr} + Call stack: + CallStack (from HasCallStack): + callStackDoc, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + pprPanic, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + assertPprPanic, called at compiler/typecheck/TcHsSyn.hs:<line>:<column> in <package-id>:TcHsSyn -T9201.hs:6:17: - Expected kind ‘x’, but ‘a’ has kind ‘y’ - In the first argument of ‘f’, namely ‘a’ - In the second argument of ‘d’, namely ‘(f a)’ - In the type signature: - ret :: d a (f a) +Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug *** unexpected failure for T9201(normal) }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15505#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15505: Assertion failures in tests T7224, T9201, LevPolyBounded -------------------------------------+------------------------------------- Reporter: osa1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler (Type | Version: 8.5 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by osa1: Old description:
To reproduce, build GHC HEAD with slow validate settings, then run the tests. Outputs:
{{{ =====> T7224(normal) 9 of 15 [0, 2, 0] cd "polykinds/T7224.run" && "/home/omer/haskell/ghc/inplace/test spaces/ghc-stage2" -c T7224.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-output Actual stderr output differs from expected: diff -uw "polykinds/T7224.run/T7224.stderr.normalised" "polykinds/T7224.run/T7224.comp.stderr.normalised" --- polykinds/T7224.run/T7224.stderr.normalised 2018-08-11 13:33:16.874459507 +0300 +++ polykinds/T7224.run/T7224.comp.stderr.normalised 2018-08-11 13:33:16.874459507 +0300 @@ -1,13 +1,11 @@ +ghc: panic! (the 'impossible' happened) + (GHC version 8.7.20180809 for x86_64-unknown-linux): + ASSERT failed! + Type-correct unfilled coercion hole {co_asw} + Call stack: + CallStack (from HasCallStack): + callStackDoc, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + pprPanic, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + assertPprPanic, called at compiler/typecheck/TcHsSyn.hs:<line>:<column> in <package-id>:TcHsSyn
-T7224.hs:6:19: - Expected kind ‘i’, but ‘i’ has kind ‘*’ - In the first argument of ‘m’, namely ‘i’ - In the type signature: ret' :: a -> m i i a - In the class declaration for ‘PMonad'’ - -T7224.hs:7:14: - Expected kind ‘i’, but ‘i’ has kind ‘*’ - In the first argument of ‘m’, namely ‘i’ - In the type signature: - bind' :: m i j a -> (a -> m j k b) -> m i k b - In the class declaration for ‘PMonad'’ +Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug *** unexpected failure for T7224(normal)
=====> T9201(normal) 11 of 15 [0, 3, 0] cd "typecheck/should_fail/T9201.run" && "/home/omer/haskell/ghc/inplace/test spaces/ghc-stage2" -c T9201.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed- specialisations -fshow-warning-groups -fdiagnostics-color=never -fno- diagnostics-show-caret -dno-debug-output Actual stderr output differs from expected: diff -uw "typecheck/should_fail/T9201.run/T9201.stderr.normalised" "typecheck/should_fail/T9201.run/T9201.comp.stderr.normalised" --- typecheck/should_fail/T9201.run/T9201.stderr.normalised 2018-08-11 13:33:21.058404868 +0300 +++ typecheck/should_fail/T9201.run/T9201.comp.stderr.normalised 2018-08-11 13:33:21.058404868 +0300 @@ -1,7 +1,11 @@ +ghc: panic! (the 'impossible' happened) + (GHC version 8.7.20180809 for x86_64-unknown-linux): + ASSERT failed! + Type-correct unfilled coercion hole {co_asr} + Call stack: + CallStack (from HasCallStack): + callStackDoc, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + pprPanic, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + assertPprPanic, called at compiler/typecheck/TcHsSyn.hs:<line>:<column> in <package-id>:TcHsSyn
-T9201.hs:6:17: - Expected kind ‘x’, but ‘a’ has kind ‘y’ - In the first argument of ‘f’, namely ‘a’ - In the second argument of ‘d’, namely ‘(f a)’ - In the type signature: - ret :: d a (f a) +Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug *** unexpected failure for T9201(normal) }}}
New description: To reproduce, build GHC HEAD with slow validate settings, then run the tests. Outputs: {{{ =====> T7224(normal) 9 of 15 [0, 2, 0] cd "polykinds/T7224.run" && "/home/omer/haskell/ghc/inplace/test spaces /ghc-stage2" -c T7224.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-output Actual stderr output differs from expected: diff -uw "polykinds/T7224.run/T7224.stderr.normalised" "polykinds/T7224.run/T7224.comp.stderr.normalised" --- polykinds/T7224.run/T7224.stderr.normalised 2018-08-11 13:33:16.874459507 +0300 +++ polykinds/T7224.run/T7224.comp.stderr.normalised 2018-08-11 13:33:16.874459507 +0300 @@ -1,13 +1,11 @@ +ghc: panic! (the 'impossible' happened) + (GHC version 8.7.20180809 for x86_64-unknown-linux): + ASSERT failed! + Type-correct unfilled coercion hole {co_asw} + Call stack: + CallStack (from HasCallStack): + callStackDoc, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + pprPanic, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + assertPprPanic, called at compiler/typecheck/TcHsSyn.hs:<line>:<column> in <package-id>:TcHsSyn -T7224.hs:6:19: - Expected kind ‘i’, but ‘i’ has kind ‘*’ - In the first argument of ‘m’, namely ‘i’ - In the type signature: ret' :: a -> m i i a - In the class declaration for ‘PMonad'’ - -T7224.hs:7:14: - Expected kind ‘i’, but ‘i’ has kind ‘*’ - In the first argument of ‘m’, namely ‘i’ - In the type signature: - bind' :: m i j a -> (a -> m j k b) -> m i k b - In the class declaration for ‘PMonad'’ +Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug *** unexpected failure for T7224(normal) =====> T9201(normal) 11 of 15 [0, 3, 0] cd "typecheck/should_fail/T9201.run" && "/home/omer/haskell/ghc/inplace/test spaces/ghc-stage2" -c T9201.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed- specialisations -fshow-warning-groups -fdiagnostics-color=never -fno- diagnostics-show-caret -dno-debug-output Actual stderr output differs from expected: diff -uw "typecheck/should_fail/T9201.run/T9201.stderr.normalised" "typecheck/should_fail/T9201.run/T9201.comp.stderr.normalised" --- typecheck/should_fail/T9201.run/T9201.stderr.normalised 2018-08-11 13:33:21.058404868 +0300 +++ typecheck/should_fail/T9201.run/T9201.comp.stderr.normalised 2018-08-11 13:33:21.058404868 +0300 @@ -1,7 +1,11 @@ +ghc: panic! (the 'impossible' happened) + (GHC version 8.7.20180809 for x86_64-unknown-linux): + ASSERT failed! + Type-correct unfilled coercion hole {co_asr} + Call stack: + CallStack (from HasCallStack): + callStackDoc, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + pprPanic, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + assertPprPanic, called at compiler/typecheck/TcHsSyn.hs:<line>:<column> in <package-id>:TcHsSyn -T9201.hs:6:17: - Expected kind ‘x’, but ‘a’ has kind ‘y’ - In the first argument of ‘f’, namely ‘a’ - In the second argument of ‘d’, namely ‘(f a)’ - In the type signature: - ret :: d a (f a) +Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug *** unexpected failure for T9201(normal) =====> LevPolyBounded(normal) 12 of 15 [0, 4, 0] cd "typecheck/should_fail/LevPolyBounded.run" && "/home/omer/haskell/ghc/inplace/test spaces/ghc-stage2" -c LevPolyBounded.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics- color=never -fno-diagnostics-show-caret -dno-debug-output Actual stderr output differs from expected: diff -uw "typecheck/should_fail/LevPolyBounded.run/LevPolyBounded.stderr.normalised" "typecheck/should_fail/LevPolyBounded.run/LevPolyBounded.comp.stderr.normalised" --- typecheck/should_fail/LevPolyBounded.run/LevPolyBounded.stderr.normalised 2018-08-11 13:33:21.150403667 +0300 +++ typecheck/should_fail/LevPolyBounded.run/LevPolyBounded.comp.stderr.normalised 2018-08-11 13:33:21.150403667 +0300 @@ -1,5 +1,11 @@ +ghc: panic! (the 'impossible' happened) + (GHC version 8.7.20180809 for x86_64-unknown-linux): + ASSERT failed! + Type-correct unfilled coercion hole {co_avm} + Call stack: + CallStack (from HasCallStack): + callStackDoc, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + pprPanic, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + assertPprPanic, called at compiler/typecheck/TcHsSyn.hs:<line>:<column> in <package-id>:TcHsSyn -LevPolyBounded.hs:10:15: - Expected a type, but ‘a’ has kind ‘TYPE r’ - In the type signature: LevPolyBounded.minBound :: a - In the class declaration for ‘XBounded’ +Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug *** unexpected failure for LevPolyBounded(normal) }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15505#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15505: Assertion failures in tests T7224, T9201, LevPolyBounded -------------------------------------+------------------------------------- Reporter: osa1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler (Type | Version: 8.5 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Problem is that * we call `zonkTcTypeToType` from `zonkTcMethInfoToMethInfo`, in `tcTyClDecl1` on class decls * when there is an unsolved (actually insoluble) residual constraint * the `CoVarHole` for that equality constraint is, of course (since it is solved) * but the zonker complains about an unfilled-in coercion hole. The assertion for an unfilled coercion hole is skipped if there are any type errors (and rightly so): see `TcHsSyn.zonkCoHole`. But at this moment we'd only called `zonkLocalEqualities` not `zonkEqualities`, so we hadn't actually added the error to in the Tc monad. Solution: call `solveEqualities` in `tcTyClDecl`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15505#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15505: Assertion failures in tests T7224, T9201, LevPolyBounded
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler (Type | Version: 8.5
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#15505: Assertion failures in tests T7224, T9201, LevPolyBounded -------------------------------------+------------------------------------- Reporter: osa1 | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler (Type | Version: 8.5 checker) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed Comment: Thanks! This patch fixes all three cases. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15505#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC