Skip to content

Uphold AvailTC Invariant for associated data fams

Alec Theriault requested to merge harpocrates/ghc:T16077 into master

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 induces a crash in Haddock.

See #16077 (closed).

Edited by Alec Theriault

Merge request reports