Ticket #3223 (closed feature request: fixed)

Opened 4 years ago

Last modified 4 years ago

please detect multiple kind errors in one run

Reported by: nr Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.10.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

GHC 6.8 stops after the first kind error. Run one:

cmm/ZDF5ex.hs:926:19:
    Kind error: `BackwardFixedPoint' is applied to too many type arguments
    In the type `BackwardFixedPoint m l e x a ()'
    In the type `ZipGF m l e x -> BackwardFixedPoint m l e x a ()'
    In the type `ZMaybe x a
                 -> ZipGF m l e x -> BackwardFixedPoint m l e x a ()'

Run two:

cmm/ZDF5ex.hs:420:31:
    Kind error: `ForwardFixedPoint' is applied to too many type arguments
    In the type `ForwardFixedPoint m l O C a (ZipGF m l O C)'
    In the type `FuelMonad (ForwardFixedPoint m l O C a (ZipGF m l O C))'
    In the type `ZipGF m l O C
                 -> FuelMonad (ForwardFixedPoint m l O C a (ZipGF m l O C))'

These errors are in unrelated parts of the code and could both be detected on the same run.

If this problem has already been fixed in 6.10, please accept my apologies---6.10 has not hit Debian yet...

Change History

Changed 4 years ago by nr

  • version changed from 6.8.2 to 6.10.1

Confirmed in 6.10.1.

Changed 4 years ago by igloo

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to fixed

With this module:

type F a = Char

type G a = Bool

f :: F Float Double
f = 'c'

g :: G Float Double
g = True

I can reproduce this with 6.8.2:

GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
[1 of 1] Compiling Main             ( f.hs, interpreted )

f.hs:9:5:
    Kind error: `G' is applied to too many type arguments
    In the type `G Float Double'
    In the type signature for `g':
      g :: G Float Double
Failed, modules loaded: none.
Prelude> 

but not the HEAD or 6.10, e.g.:

GHCi, version 6.10.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling Main             ( f.hs, interpreted )

f.hs:6:5:
    Kind error: `F' is applied to too many type arguments
    In the type `F Float Double'
    In the type signature for `f':
      f :: F Float Double

f.hs:9:5:
    Kind error: `G' is applied to too many type arguments
    In the type `G Float Double'
    In the type signature for `g':
      g :: G Float Double
Failed, modules loaded: none.
Prelude> 

so I think that this has already been fixed. If you still think it's broken, please reopen and attach a testcase.

Changed 4 years ago by simonpj

I cannot reproduce this either with 6.10.1. I've tried modifying ZDF5ex.hs (as of today), lines 417 and 922, and I get both kind errors in one sweep.

compiler\cmm\ZDF5ex.hs:417:31:
    Kind error: `ForwardFixedPoint' is applied to too many type arguments
    In the type `ForwardFixedPoint m l O C a (ZipGF m l O C)'
    In the type `FuelMonad (ForwardFixedPoint m l O C a (ZipGF m l O C))'
    In the type `ZipGF m l O C
                 -> FuelMonad (ForwardFixedPoint m l O C a (ZipGF m l O C))'

compiler\cmm\ZDF5ex.hs:922:19:
    Kind error: `BackwardFixedPoint' is applied to too many type arguments
    In the type `BackwardFixedPoint m l O C a ()'
    In the type `ZipGF m l O C -> BackwardFixedPoint m l O C a ()'
    In the type `BackwardTransfers m l a
                 -> ZipGF m l O C -> BackwardFixedPoint m l O C a ()'

If you can give us a repro case, I'll look at it some more. It's possible there is something wrong... after all you said it was still the case with 6.10.1. Pls re-open if you can see it again.

Simon

Changed 4 years ago by nr

I have now upgraded to 6.10, and this bug should stay closed.

Changed 4 years ago by simonpj

But the first comment (as opposed to the initial report) confirmed that the bug is present in 6.10.1. That's what's puzzling me. I don't want to lose a good bug!

Simon

Note: See TracTickets for help on using tickets.