casr-logbook 0.5.0 → 0.5.1
raw patch · 3 files changed
+11/−2 lines, 3 files
Files
casr-logbook.cabal view
@@ -1,5 +1,5 @@ name: casr-logbook-version: 0.5.0+version: 0.5.1 license: OtherLicense license-file: LICENSE author: Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>
changelog view
@@ -1,3 +1,7 @@+0.5.1++* `Semigroup` instance for later GHC versions.+ 0.5.0 * update `digit` package.
src/Data/Aviation/Casr/Logbook/Types/TimeAmount.hs view
@@ -13,6 +13,7 @@ import Data.Bool(Bool, bool) import Data.Maybe(fromMaybe) import Data.Ord((>))+import Data.Semigroup import Prelude(Integral, divMod, mod) import Control.Lens(makeClassy, (^?), over, _1, ( # )) import Data.Eq(Eq)@@ -55,11 +56,15 @@ timeAmountBy10 (TimeAmount a b) = a * 10 + integralDecimal # b +instance Semigroup TimeAmount where+ (<>) =+ addtimeamount+ instance Monoid TimeAmount where mempty = zerotimeamount mappend =- addtimeamount+ (<>) ---- belongs in digit package