sampling

Basic sampling functionality for Haskell.
Log | Files | Refs | README | LICENSE

commit 368d862a63ea27133d165d1b15979a379208d499
parent 3611122f870dd0c6f0ec4147c6f7882339c03823
Author: Jared Tobin <jared@jtobin.ca>
Date:   Tue,  9 Feb 2016 21:37:34 +1300

Touch-ups.

Diffstat:
M.travis.yml | 13++++++++++++-
Mlib/Numeric/Sampling.hs | 4++++
Msampling.cabal | 3+--
Msrc/Main.hs | 1-
4 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/.travis.yml b/.travis.yml @@ -1,2 +1,13 @@ sudo: false -language: haskell + +env: + STACK_YAML: stack.yml + +install: + - stack --no-terminal --skip-ghc-check setup + - stack --no-terminal --skip-ghc-check build --copy-bins + +addons: + apt: + packages: [libgmp-dev] + diff --git a/lib/Numeric/Sampling.hs b/lib/Numeric/Sampling.hs @@ -1,6 +1,7 @@ {-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} {-# LANGUAGE BangPatterns #-} +{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} module Numeric.Sampling ( @@ -23,6 +24,9 @@ module Numeric.Sampling ( import qualified Control.Foldl as F import Control.Monad.Primitive (PrimMonad, PrimState) import qualified Data.Foldable as Foldable +#if __GLASGOW_HASKELL__ < 710 +import Data.Foldable (Foldable) +#endif import Data.Function (on) import Data.List (sortBy) import Data.Vector (Vector) diff --git a/sampling.cabal b/sampling.cabal @@ -27,7 +27,7 @@ library default-language: Haskell2010 hs-source-dirs: lib ghc-options: - -Wall -O2 + -Wall other-modules: Numeric.Sampling.Internal exposed-modules: @@ -47,7 +47,6 @@ executable sampling-test -Wall -O2 build-depends: base - , containers , sampling benchmark bench-sampling diff --git a/src/Main.hs b/src/Main.hs @@ -3,7 +3,6 @@ module Main where import Numeric.Sampling -import qualified Data.Map.Strict as Map main :: IO () main = do