Changes between Version 4 and Version 5 of BenGamari/ProposalMilestoneExample


Ignore:
Timestamp:
Feb 13, 2016 2:03:57 PM (4 years ago)
Author:
bgamari
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BenGamari/ProposalMilestoneExample

    v4 v5  
    102102
    103103
    104 == Phases
     104== Implementation
    105105
    106106=== Phase 1 (GHC 8.0)  #10365
     
    125125
    126126 - Move the now deprecated `mappend` method out of the `Monoid` class, and possibly turn `mappend` into a legacy top-level binding (c.f. "Monad of no `return` Proposal")
    127 
    128 
    129 == Writing compatible code
    130 
    131 {{{#!hs
    132 import Data.Semigroup -- re-exports Data.Monoid (w/ Semigroup((<>)))
    133 
    134 instance Semigroup Foo where
    135   (<>) = …
    136 
    137 instance Monoid Foo where
    138   mempty = …
    139 
    140 #if !(MIN_VERSION_base(5,0,0))
    141   -- assumption: Semigroup becomes superclass w/ base-5.0.0
    142   mappend = (<>)
    143 #endif
    144 }}}
    145 
    146 ----
    147 
    148 TODO: ...integrate migration roadmap outlined in http://permalink.gmane.org/gmane.comp.lang.haskell.libraries/24526