Skip to content
  • Alec Theriault's avatar
    2a431640
    Uphold AvailTC Invariant for associated data fams · 2a431640
    Alec Theriault authored
    The AvailTC was not be upheld for explicit export module
    export lists when the module contains associated data families.
    
        module A (module A) where
        class    C a  where { data T a }
        instance C () where { data T () = D }
    
    Used to (incorrectly) report avails as `[C{C, T;}, T{D;}]`. Note that
    although `T` is exported, the avail where it is the parent does _not_
    list it as its first element. This avail is now correctly listed as
    `[C{C, T;}, T{T, D;}]`.
    
    This was induces a [crash in Haddock][0].
    
    See #16077.
    
    [0]: https://github.com/haskell/haddock/issues/979
    2a431640
    Uphold AvailTC Invariant for associated data fams
    Alec Theriault authored
    The AvailTC was not be upheld for explicit export module
    export lists when the module contains associated data families.
    
        module A (module A) where
        class    C a  where { data T a }
        instance C () where { data T () = D }
    
    Used to (incorrectly) report avails as `[C{C, T;}, T{D;}]`. Note that
    although `T` is exported, the avail where it is the parent does _not_
    list it as its first element. This avail is now correctly listed as
    `[C{C, T;}, T{T, D;}]`.
    
    This was induces a [crash in Haddock][0].
    
    See #16077.
    
    [0]: https://github.com/haskell/haddock/issues/979
Loading