Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • sheaf's avatar
    4d29ecdf
    Migrate errors to diagnostics in GHC.Tc.Module · 4d29ecdf
    sheaf authored and Marge Bot's avatar Marge Bot committed
    This commit migrates the errors in GHC.Tc.Module to use the new
    diagnostic infrastructure.
    
    It required a significant overhaul of the compatibility checks between
    an hs-boot or signature module and its implementation; we now use
    a Writer monad to accumulate errors; see the BootMismatch datatype
    in GHC.Tc.Errors.Types, with its panoply of subtypes.
    For the sake of readability, several local functions inside the
    'checkBootTyCon' function were split off into top-level functions.
    
    We split off GHC.Types.HscSource into a "boot or sig" vs "normal hs file"
    datatype, as this mirrors the logic in several other places where we
    want to treat hs-boot and hsig files in a similar fashion.
    
    This commit also refactors the Backpack checks for type synonyms
    implementing abstract data, to correctly reject implementations that
    contain qualified or quantified types (this fixes #23342 and #23344).
    4d29ecdf
    History
    Migrate errors to diagnostics in GHC.Tc.Module
    sheaf authored and Marge Bot's avatar Marge Bot committed
    This commit migrates the errors in GHC.Tc.Module to use the new
    diagnostic infrastructure.
    
    It required a significant overhaul of the compatibility checks between
    an hs-boot or signature module and its implementation; we now use
    a Writer monad to accumulate errors; see the BootMismatch datatype
    in GHC.Tc.Errors.Types, with its panoply of subtypes.
    For the sake of readability, several local functions inside the
    'checkBootTyCon' function were split off into top-level functions.
    
    We split off GHC.Types.HscSource into a "boot or sig" vs "normal hs file"
    datatype, as this mirrors the logic in several other places where we
    want to treat hs-boot and hsig files in a similar fashion.
    
    This commit also refactors the Backpack checks for type synonyms
    implementing abstract data, to correctly reject implementations that
    contain qualified or quantified types (this fixes #23342 and #23344).
Code owners
Assign users and groups as approvers for specific file changes. Learn more.