Error cascade for TLKSs without accompanying declarations
If I write this:
{-# LANGUAGE TopLevelKindSignatures #-}
module Bug where
type Wat :: ()
I get a surprising amount of errors as a result:
[1 of 1] Compiling Bug ( ../Bug.hs, ../Bug.o )
../Bug.hs:4:1: error:
Top-level kind signature for a type previously declared:
type Wat :: ()
(The kind signature must be given where ‘Wat’ is declared.)
|
4 | type Wat :: ()
| ^^^^^^^^^^^
../Bug.hs:4:6: error:
The top-level kind signature for ‘Wat’
lacks an accompanying binding
|
4 | type Wat :: ()
| ^^^
The first error message seems misguided, as Wat
wasn't previously declared before. I would expect only to receive the second error message about lacking an accompanying binding. Well, I suppose it should say "declaration" instead of a "binding", but that's another matter.