Skip to content
  • Herbert Valerio Riedel's avatar
    dc737056
    Re-export `<$>` from Prelude (#10113) · dc737056
    Herbert Valerio Riedel authored
    Whether to re-export the `<$>` non-method operator from `Prelude` wasn't
    explicitly covered in the original AMP proposal[1], but it turns out that
    not doing so forces most code that makes use of applicatives to import
    `Data.Functor` or `Control.Applicative` just to get that operator into
    scope.  To this end, it was proposed to add `<$>` to Prelude as well[2].
    
    The down-side is that this increases the amount of redundant-import
    warnings triggered, as well as the relatively minor issue of stealing
    the `<$>` operator from the default namespace for good (although at this
    point `<$>` is supposed to be ubiquitous anyway due to `Applicative`
    being implicitly required into the next Haskell Report)
    
     [1]: https://wiki.haskell.org/Functor-Applicative-Monad_Proposal
     [2]: http://thread.gmane.org/gmane.comp.lang.haskell.libraries/24161
    
    (cherry picked from commit eb3661f2)
    dc737056
    Re-export `<$>` from Prelude (#10113)
    Herbert Valerio Riedel authored
    Whether to re-export the `<$>` non-method operator from `Prelude` wasn't
    explicitly covered in the original AMP proposal[1], but it turns out that
    not doing so forces most code that makes use of applicatives to import
    `Data.Functor` or `Control.Applicative` just to get that operator into
    scope.  To this end, it was proposed to add `<$>` to Prelude as well[2].
    
    The down-side is that this increases the amount of redundant-import
    warnings triggered, as well as the relatively minor issue of stealing
    the `<$>` operator from the default namespace for good (although at this
    point `<$>` is supposed to be ubiquitous anyway due to `Applicative`
    being implicitly required into the next Haskell Report)
    
     [1]: https://wiki.haskell.org/Functor-Applicative-Monad_Proposal
     [2]: http://thread.gmane.org/gmane.comp.lang.haskell.libraries/24161
    
    (cherry picked from commit eb3661f2)
Loading