Skip to content
  • sheaf's avatar
    Allow boring class declarations in hs-boot files · f27a63fe
    sheaf authored and Marge Bot's avatar Marge Bot committed
      There are two different ways of declaring a class in an hs-boot file:
    
        - a full declaration, where everything is written as it is
          in the .hs file,
        - an abstract declaration, where class methods and superclasses
          are left out.
    
      However, a declaration with no methods and a trivial superclass,
      such as:
    
        class () => C a
    
      was erroneously considered to be an abstract declaration, because
      the superclass is trivial.
      This is remedied by a one line fix in GHC.Tc.TyCl.tcClassDecl1.
    
      This patch also further clarifies the documentation around
      class declarations in hs-boot files.
    
      Fixes #20661, #20588.
    f27a63fe