packages feed

optimization 0.1.7 → 0.1.9

raw patch · 4 files changed

+94/−68 lines, 4 filesdep ~addep ~distributivesetup-changed

Dependency ranges changed: ad, distributive

Files

.travis.yml view
@@ -1,25 +1,87 @@-language: haskell-before_install:-  # Uncomment whenever hackage is down.-  # - mkdir -p ~/.cabal && cp travis/config ~/.cabal/config && cabal update+# This Travis job script has been generated by a script via+#+#   make_travis_yml_2.hs 'optimization.cabal'+#+# For more information, see https://github.com/hvr/multi-ghc-travis+#+language: c+sudo: false -  # Try installing some of the build-deps with apt-get for speed.-  - travis/cabal-apt-install $mode+git:+  submodules: false  # whether to recursively clone submodules +cache:+  directories:+    - $HOME/.cabal/packages+    - $HOME/.cabal/store++before_cache:+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log+  # remove files that are regenerated by 'cabal update'+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx++matrix:+  include:+    - compiler: "ghc-7.8.4"+    # env: TEST=--disable-tests BENCH=--disable-benchmarks+      addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}+    - compiler: "ghc-7.10.3"+    # env: TEST=--disable-tests BENCH=--disable-benchmarks+      addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}+    - compiler: "ghc-8.0.2"+    # env: TEST=--disable-tests BENCH=--disable-benchmarks+      addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}++before_install:+ - HC=${CC}+ - unset CC+ - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH+ - PKGNAME='optimization'+ install:-  - cabal configure $mode-  - cabal build+ - cabal --version+ - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"+ - BENCH=${BENCH---enable-benchmarks}+ - TEST=${TEST---enable-tests}+ - travis_retry cabal update -v+ - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config+ - rm -fv cabal.project.local+ - "echo 'packages: .' > cabal.project"+ - rm -f cabal.project.freeze+ - cabal new-build -w ${HC} ${TEST} ${BENCH} --dep -j2+ - cabal new-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 +# Here starts the actual work to be performed for the package under test;+# any command which exits with a non-zero exit code causes the build to fail. script:-  - $script && hlint src --cpp-define HLINT+ - if [ -f configure.ac ]; then autoreconf -i; fi+ - rm -rf dist/+ - cabal sdist # test that a source-distribution can be generated+ - cd dist/+ - SRCTAR=(${PKGNAME}-*.tar.gz)+ - SRC_BASENAME="${SRCTAR/%.tar.gz}"+ - tar -xvf "./$SRC_BASENAME.tar.gz"+ - cd "$SRC_BASENAME/"+## from here on, CWD is inside the extracted source-tarball+ - rm -fv cabal.project.local+ - "echo 'packages: .' > cabal.project"+ # this builds all libraries and executables (without tests/benchmarks)+ - rm -f cabal.project.freeze+ - cabal new-build -w ${HC} --disable-tests --disable-benchmarks+ # this builds all libraries and executables (including tests/benchmarks)+ # - rm -rf ./dist-newstyle+ - cabal new-build -w ${HC} ${TEST} ${BENCH} -notifications:-  irc:-    channels:-      - "irc.freenode.org#haskell-lens"-    skip_join: true-    template:-      - "\x0313foo\x03/\x0306%{branch}\x03 \x0314%{commit}\x03 %{build_url} %{message}"+ # there's no 'cabal new-test' yet, so let's emulate for now+ - TESTS=( $(awk 'tolower($0) ~ /^test-suite / { print $2 }' *.cabal) )+ - if [ "$TEST" != "--enable-tests" ]; then TESTS=(); fi+ - shopt -s globstar;+   RC=true; for T in ${TESTS[@]}; do echo "== $T ==";+   if dist-newstyle/build/**/$SRC_BASENAME/**/build/$T/$T; then echo "= $T OK =";+   else echo "= $T FAILED ="; RC=false; fi; done; $RC -env:-  - mode="--enable-tests" script="cabal test"+# EOF
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
− Setup.lhs
@@ -1,44 +0,0 @@-#!/usr/bin/runhaskell-\begin{code}-{-# OPTIONS_GHC -Wall #-}-module Main (main) where--import Data.List ( nub )-import Data.Version ( showVersion )-import Distribution.Package ( PackageName(PackageName), PackageId, InstalledPackageId, packageVersion, packageName )-import Distribution.PackageDescription ( PackageDescription(), TestSuite(..) )-import Distribution.Simple ( defaultMainWithHooks, UserHooks(..), simpleUserHooks )-import Distribution.Simple.Utils ( rewriteFile, createDirectoryIfMissingVerbose )-import Distribution.Simple.BuildPaths ( autogenModulesDir )-import Distribution.Simple.Setup ( BuildFlags(buildVerbosity), fromFlag )-import Distribution.Simple.LocalBuildInfo ( withLibLBI, withTestLBI, LocalBuildInfo(), ComponentLocalBuildInfo(componentPackageDeps) )-import Distribution.Verbosity ( Verbosity )-import System.FilePath ( (</>) )--main :: IO ()-main = defaultMainWithHooks simpleUserHooks-  { buildHook = \pkg lbi hooks flags -> do-     generateBuildModule (fromFlag (buildVerbosity flags)) pkg lbi-     buildHook simpleUserHooks pkg lbi hooks flags-  }--generateBuildModule :: Verbosity -> PackageDescription -> LocalBuildInfo -> IO ()-generateBuildModule verbosity pkg lbi = do-  let dir = autogenModulesDir lbi-  createDirectoryIfMissingVerbose verbosity True dir-  withLibLBI pkg lbi $ \_ libcfg -> do-    withTestLBI pkg lbi $ \suite suitecfg -> do-      rewriteFile (dir </> "Build_" ++ testName suite ++ ".hs") $ unlines-        [ "module Build_" ++ testName suite ++ " where"-        , "deps :: [String]"-        , "deps = " ++ (show $ formatdeps (testDeps libcfg suitecfg))-        ]-  where-    formatdeps = map (formatone . snd)-    formatone p = case packageName p of-      PackageName n -> n ++ "-" ++ showVersion (packageVersion p)--testDeps :: ComponentLocalBuildInfo -> ComponentLocalBuildInfo -> [(InstalledPackageId, PackageId)]-testDeps xs ys = nub $ componentPackageDeps xs ++ componentPackageDeps ys--\end{code}
optimization.cabal view
@@ -1,6 +1,6 @@ name:          optimization category:      Math-version:       0.1.7+version:       0.1.9 license:       BSD3 cabal-version: >= 1.10 license-file:  LICENSE@@ -11,6 +11,7 @@ bug-reports:   http://github.com/bgamari/optimization/issues copyright:     Copyright (C) 2013 Ben Gamari synopsis:      Numerical optimization+tested-with:   GHC==7.8.4, GHC==7.10.3, GHC==8.0.2 description:   These are a set of implementations of various numerical optimization   methods in Haskell. Note that these implementations were originally@@ -21,9 +22,14 @@   a number of optimization techniques from the modern optimization   literature.   .-  A deep introduction to optimization can be found in Boyd and Vandenberghe's-  *Convex Optimization* which available freely online,-  (<http://web.stanford.edu/~boyd/cvxbook/>).+  Those seeking a high-level overview of some of these methods are+  referred to Stephen Wright's excellent tutorial from NIPS 2010+  <http://videolectures.net/nips2010_wright_oaml/>. A deeper+  introduction can be found in Boyd and Vandenberghe's /Convex+  Optimization/ which available freely online,+  <http://web.stanford.edu/~boyd/cvxbook/>. Vandenberghe's lecture+  at the 2009 Machine Learning Summer School may also be of interest+  <http://videolectures.net/mlss09uk_vandenberghe_co/>.  build-type:    Simple @@ -49,10 +55,10 @@   build-depends:     base                >= 4.4          && < 5,     vector              >= 0.10         && < 1.0,-    ad                  >= 3.4          && < 4.3,+    ad                  >= 3.4          && < 4.4,     linear              >= 1.16         && < 2.0,     semigroupoids       >= 3.0          && < 6.0,-    distributive        >= 0.3          && < 0.5+    distributive        >= 0.3          && < 0.6    exposed-modules:     Optimization.LineSearch