Replacing `CUSKs` examples with `StandaloneKindSignatures` throughout Kind Polymorphism's documentation
Summary
Location of documentation issue: GHC user's guide, Kind Polymorphism
Even thought CUSKs
is now considered legacy, it is used throughout the kind polymorphism section a number of times as an example.
This example is from kind inference in closed type families:
type family F1 a where
F1 True = False
F1 False = True
F1 x = x
-- F1 fails to compile: kind-indexing is not inferred
type family F2 (a :: k) where
F2 True = False
F2 False = True
F2 x = x
-- F2 fails to compile: no complete signature
type family F3 (a :: k) :: k where
F3 True = False
F3 False = True
F3 x = x
-- OK
Proposed improvements or changes
I think there are 3 good options:
- Remove them and rewrite them using
StandaloneKindSignatures
- Add equivalent examples using
StandaloneKindSignatures
, comment the originalCUSKs
examples, and add a little note to them explaining that they are legacy - Add the examples using
StandaloneKindSignatures
, and add a short comment to theCUSKs
examples, stating that they are legacy