Skip to content

Commit

Permalink
working with 8.2 prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
mstksg committed Jul 28, 2018
1 parent 7f6f475 commit e489cbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ description: Please see the README on GitHub at <https://github.com/mstk
tested-with: GHC >= 8.2

dependencies:
- base >= 4.7 && < 5
- base >= 4.10 && < 5
- containers

ghc-options:
Expand Down
4 changes: 2 additions & 2 deletions src/Numeric/EMD.hs
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ extendExtrema xs = \case
(minIx, M.singleton (extendSym (fromIntegral minIx)) minVal)
flippedMax = flip fmap (M.lookupMax maxs) $ \(maxIx, maxVal) ->
(maxIx, M.singleton (extendSym (fromIntegral maxIx)) maxVal)
in addFirst <> addLast
in addFirst `mappend` addLast
where
lastIx = fromIntegral $ maxBound @(Finite n)
firstPoint = M.singleton 0 (SVG.head xs)
lastPoint = M.singleton lastIx (SVG.last xs)
firstLast = firstPoint <> lastPoint
firstLast = firstPoint `mappend` lastPoint
extendSym i = 2 * lastIx - i

-- | Build a splined vector against a map of control points.
Expand Down

0 comments on commit e489cbc

Please sign in to comment.