• Simon Peyton Jones's avatar
    Improve handling of data type return kinds · 4bf18646
    Simon Peyton Jones authored
    Following a long conversation with Richard, this patch tidies up the
    handling of return kinds for data/newtype declarations (vanilla,
    family, and instance).
    
    I have substantially edited the Notes in TyCl, so they would
    bear careful reading.
    
    Fixes #18300, #18357
    
    In GHC.Tc.Instance.Family.newFamInst we were checking some Lint-like
    properties with ASSSERT.  Instead Richard and I have added
    a proper linter for axioms, and called it from lintGblEnv, which in
    turn is called in tcRnModuleTcRnM
    
    New tests (T18300, T18357) cause an ASSERT failure in HEAD.
    4bf18646
Code owners : Ben Gamari
core-spec.pdf 368 KB