Skip to content
  • Wander Hillen's avatar
    29fc00bc
    Export singleton function from Data.List · 29fc00bc
    Wander Hillen authored and Ben Gamari's avatar Ben Gamari committed
    Data.OldList exports a monomorphized singleton function but
    it is not re-exported by Data.List. Adding the export to
    Data.List causes a conflict with a 14-year old function of the
    same name and type by SPJ in GHC.Utils.Misc. We can't just remove
    this function because that leads to a problems when building
    GHC with a stage0 compiler that does not have singleton in
    Data.List yet. We also can't hide the function in GHC.Utils.Misc
    since it is not possible to hide a function from a module if the
    module does not export the function. To work around this, all
    places where the Utils.Misc singleton was used now use a qualified
    version like Utils.singleton and in GHC.Utils.Misc we are very
    specific about which version we export.
    
    (cherry picked from commit e195dae6)
    29fc00bc
    Export singleton function from Data.List
    Wander Hillen authored and Ben Gamari's avatar Ben Gamari committed
    Data.OldList exports a monomorphized singleton function but
    it is not re-exported by Data.List. Adding the export to
    Data.List causes a conflict with a 14-year old function of the
    same name and type by SPJ in GHC.Utils.Misc. We can't just remove
    this function because that leads to a problems when building
    GHC with a stage0 compiler that does not have singleton in
    Data.List yet. We also can't hide the function in GHC.Utils.Misc
    since it is not possible to hide a function from a module if the
    module does not export the function. To work around this, all
    places where the Utils.Misc singleton was used now use a qualified
    version like Utils.singleton and in GHC.Utils.Misc we are very
    specific about which version we export.
    
    (cherry picked from commit e195dae6)
Loading