packages feed

preliminaries (empty) → 0.1.0.0

raw patch · 7 files changed

+389/−0 lines, 7 filesdep +abstract-pardep +bifunctorsdep +classy-prelude-conduitsetup-changed

Dependencies added: abstract-par, bifunctors, classy-prelude-conduit, microlens-contra, microlens-platform, monad-par, monad-parallel, mono-traversable-instances, mtl, parallel, stm-conduit

Files

+ .travis.yml view
@@ -0,0 +1,112 @@+# Copy these contents into the root directory of your Github project in a file+# named .travis.yml++# Use new container infrastructure to enable caching+sudo: false++# Choose a lightweight base image; we provide our own build tools.+language: c++# Caching so the next build will be fast too.+cache:+  directories:+  - $HOME/.ghc+  - $HOME/.cabal+  - $HOME/.stack++# The different configurations we want to test. We have BUILD=cabal which uses+# cabal-install, and BUILD=stack which uses Stack. More documentation on each+# of those below.+#+# We set the compiler values here to tell Travis to use a different+# cache file per set of arguments.+#+# If you need to have different apt packages for each combination in the+# matrix, you can use a line such as:+#     addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}+matrix:+  include:+  # Nightly builds are allowed to fail+  - env: BUILD=stack ARGS="--resolver nightly"+    compiler: ": #stack nightly"+    addons: {apt: {packages: [libgmp,libgmp-dev]}}++  - env: BUILD=stack ARGS="--resolver nightly"+    compiler: ": #stack nightly osx"+    os: osx++  allow_failures:+  - env: BUILD=stack ARGS="--resolver nightly"++before_install:+# Using compiler above sets CC to an invalid value, so unset it+- unset CC++# We want to always allow newer versions of packages when building on GHC HEAD+- CABALARGS=""+- if [ "x$GHCVER" = "xhead" ]; then CABALARGS=--allow-newer; fi++# Download and unpack the stack executable+- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin:/opt/alex/$ALEXVER/bin:/opt/happy/$HAPPYVER/bin:$HOME/.cabal/bin:$PATH+- mkdir -p ~/.local/bin+- |+  if [ `uname` = "Darwin" ]+  then+    travis_retry curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin+  else+    travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'+  fi++  # Use the more reliable S3 mirror of Hackage+  mkdir -p $HOME/.cabal+  echo 'remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/' > $HOME/.cabal/config+  echo 'remote-repo-cache: $HOME/.cabal/packages' >> $HOME/.cabal/config++  if [ "$CABALVER" != "1.16" ]+  then+    echo 'jobs: $ncpus' >> $HOME/.cabal/config+  fi++# Get the list of packages from the stack.yaml file+- PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')++install:+- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"+- if [ -f configure.ac ]; then autoreconf -i; fi+- |+  set -ex+  case "$BUILD" in+    stack)+      stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies+      ;;+    cabal)+      cabal --version+      travis_retry cabal update+      cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES+      ;;+  esac+  set +ex++script:+- |+  set -ex+  case "$BUILD" in+    stack)+      stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps+      ;;+    cabal)+      cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES++      ORIGDIR=$(pwd)+      for dir in $PACKAGES+      do+        cd $dir+        cabal check || [ "$CABALVER" == "1.16" ]+        cabal sdist+        SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && \+          (cd dist && cabal install --force-reinstalls "$SRC_TGZ")+        cd $ORIGDIR+      done+      ;;+  esac+  set +ex
+ LICENCE view
@@ -0,0 +1,30 @@+Copyright Yghor Kerscher © 2016++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of Yghor Kerscher nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++This software is provided by the copyright holders and contributors+“as is” and any express or implied warranties, including, but not+limited to, the implied warranties of merchantability and fitness for+a particular purpose are disclaimed. in no event shall the copyright+owner or contributors be liable for any direct, indirect, incidental,+special, exemplary, or consequential damages (including, but not+limited to, procurement of substitute goods or services; loss of use,+data, or profits; or business interruption) however caused and on any+theory of liability, whether in contract, strict liability, or tort+(including negligence or otherwise) arising in any way out of the use+of this software, even if advised of the possibility of such damage.
+ README.md view
@@ -0,0 +1,46 @@+Preliminaries+=============++[![Build Status](https://travis-ci.org/kerscher/preliminaries.svg?branch=master)](https://travis-ci.org/kerscher/preliminaries)+![BSD3 license](https://img.shields.io/badge/license-BSD3-blue.svg)++The Haskell Report specifies the [Prelude](https://www.haskell.org/onlinereport/standard-prelude.html) with a minimal amount of definitions that are always available in scope for application writers. Due to its simplicity and frugality, multiple alternatives and support libraries were devised to improve upon it, including:++* [`classy-prelude`](https://github.com/snoyberg/mono-traversable/tree/master/classy-prelude)+* [`base-prelude`](https://github.com/nikita-volkov/base-prelude)+* [`basic-prelude`](https://github.com/snoyberg/basic-prelude)+* [`prelude-extras`](https://github.com/ekmett/prelude-extras)+* [`protolude`](https://github.com/sdiehl/protolude)++`preliminaries` is one of such alternatives and builds upon [`classy-prelude-conduit`](https://github.com/snoyberg/mono-traversable/tree/master/classy-prelude-conduit), with the following functionality out-of-the-box:++* Data manipulation and structures — i.e. [`microlens`](https://github.com/aelve/microlens) + [`mono-traversable`](https://github.com/snoyberg/mono-traversable)+* Streaming+* Concurrency+* Parallelism+* Read-only, write-only and read-write environments — i.e. [`mtl`](https://github.com/ekmett/mtl)++Contrary to most other alternatives, there is no attempt at being minimal.+Nevertheless, it's shipped with `microlens` instead of the full-blown `lens`.++Usage+-----++To use it, put the following on your `.cabal` file, ignoring the “…” for ommited parts:++```+executable your-executable+  language:           Haskell2010+  default-extensions: NoImplicitPrelude+  build-depends:      preliminaries >= 0.1.0 < 2+  …+```++And on each file, add `import Preliminaries`.++You might also want to look at this project’s Cabal file to check on useful GHC extensions to enable alongside this change.++Contributing+------------++In case something does not build or you find other unpleasant aspects of the library, please send a pull request or contact the maintainer.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ preliminaries.cabal view
@@ -0,0 +1,73 @@+name:                preliminaries+version:             0.1.0.0+synopsis:            A larger alternative to the Prelude.+description:         A GHC-only alternative to the Prelude with a large amount of imports available by default.+homepage:            http://github.com/kerscher/preliminaries+license:             BSD3+license-file:        LICENCE+author:              Yghor Kerscher+maintainer:          kerscher@acm.org+copyright:           © 2016 Yghor Kerscher+category:            Prelude+build-type:          Simple+cabal-version:       >=1.10++extra-source-files: README.md                     +                    stack.yaml+                    .travis.yml++source-repository head+  type:     git+  location: https://github.com/kerscher/preliminaries+                        +library+  hs-source-dirs:      source+  default-language:    Haskell2010+  default-extensions:  NoImplicitPrelude+                     , OverloadedStrings+                     , OverloadedLists+                     , LambdaCase+                     , GADTSyntax+                     , RankNTypes+                     , ScopedTypeVariables+                     , DeriveGeneric+                     , TupleSections+                     , BangPatterns+                     , MultiParamTypeClasses+                     , FlexibleInstances+                     , FlexibleContexts+                     , MultiWayIf+                     , TypeFamilies+                     , TypeOperators+                     , FunctionalDependencies+                     , DisambiguateRecordFields+                     , MonadComprehensions+                     , BinaryLiterals+                     , RecursiveDo+                     , ParallelListComp+                     , PartialTypeSignatures+                     , RecordWildCards+                     , PatternSynonyms+                     , EmptyCase+                     , InstanceSigs+                     , KindSignatures+                     , RebindableSyntax+                     , DeriveFunctor+                     , DeriveFoldable+                     , DeriveTraversable+                     , ConstraintKinds+  exposed-modules:     Preliminaries+  ghc-options:         -Wall+                       -fno-warn-unused-imports+                       -fno-warn-dodgy-exports+  build-depends:       classy-prelude-conduit     >= 1.0.0 && < 2+                     , abstract-par               >= 0.3.3 && < 1+                     , bifunctors                 >= 5.4.1 && < 6+                     , microlens-platform         >= 0.3.5 && < 1+                     , microlens-contra           >= 0.1.0 && < 1+                     , monad-par                  >= 0.3.4 && < 1+                     , monad-parallel             >= 0.7.2 && < 1+                     , mono-traversable-instances >= 0.1.0 && < 1+                     , parallel                   >= 3.2.1 && < 4+                     , mtl                        >= 2.2.1 && < 3+                     , stm-conduit                >= 3.0.0 && < 4
+ source/Preliminaries.hs view
@@ -0,0 +1,120 @@+{-|+Module      : Preliminaries+Copyright   : © Yghor Kerscher, 2016+Licence     : BSD-3+Maintainer  : kerscher@acm.org+Stability   : experimental++The Haskell Report specifies the <https://www.haskell.org/onlinereport/standard-prelude.html Prelude> with a minimal amount of definitions that are always available in scope for application writers. Due to its simplicity and frugality, multiple alternatives and support libraries were devised to improve upon it, including:++* <https://github.com/snoyberg/mono-traversable/tree/master/classy-prelude classy-prelude>+* <https://github.com/nikita-volkov/base-prelude base-prelude>+* <https://github.com/snoyberg/basic-prelude basic-prelude>+* <https://github.com/ekmett/prelude-extras prelude-extras>+* <https://github.com/sdiehl/protolude protolude>++@Preliminaries@ is one of such alternatives and builds upon <https://hackage.haskell.org/package/classy-prelude-0.12.8 classy-prelude>, with the following functionality out-of-the-box:++* Data manipulation — i.e. <https://github.com/aelve/microlens microlens>+* Streaming+* Concurrency+* Parallelism+* Read-only, write-only and read-write environments — i.e. <https://github.com/ekmett/mtl mtl>++To use it, put the following on your @.cabal@ file, ignoring the “…” for ommited parts:++@+…+default-extensions: NoImplicitPrelude+build-depends:      preliminaries >= 0.1.0 < 2+@++And on each file, add @import Preliminaries@.++You might also want to look at this project’s Cabal file to check on useful GHC extensions to enable alongside this change.+In case something does not build or you find other unpleasant aspects of the library, please contact the maintainer.++-}+module Preliminaries+( -- * Data manipulation+  module Lens.Micro.Platform+, module Lens.Micro.Contra+  -- * Concurrency+, module Data.Conduit.Async+, module Data.Conduit.TQueue+  -- * Parallelism+, module Control.Monad.Par+, parFork+, parNew+, parNewFull+, parGet+, parPut+, parSpawn+, parParMap+, module Control.Monad.Parallel+, module Control.Parallel+, module Control.Parallel.Strategies+, thru+  -- * Environments+, module Control.Monad.Reader+, module Control.Monad.State.Lazy+, module Control.Monad.Writer.Lazy+  -- * Re-exports+, module ClassyPrelude.Conduit+, module Data.Biapplicative+, module Data.Bifoldable+, module Data.Bitraversable+, module Data.MonoTraversable.Instances+)+where++import Control.Monad.Reader      (MonadReader, ask, asks, ReaderT (..), Reader, runReaderT, runReader)+import Control.Monad.State.Lazy  (MonadState, get, put, modify, StateT(..), State, runStateT, runState)+import Control.Monad.Writer.Lazy (MonadWriter, tell, listen, listens, WriterT(..), Writer, runWriterT, runWriter)+import Control.Monad.Par         as Par+import Control.Monad.Par.Class   (ParFuture)+import Control.Monad.Par         (Par, runPar, runParIO, IVar, parMapM, parMapReduceRange, InclusiveRange(..), parFor)+import Control.Monad.Parallel    (MonadFork, forkExec)+import Control.Parallel+import Control.Parallel.Strategies as Strategies+import Control.Parallel.Strategies+  ( Strategy, withStrategy+  , rseq, rdeepseq+  , rpar, rparWith+  , evalTraversable, parTraversable, parMap+  , ($|), ($||), (.|), (.||), (-|), (-||)+  , Eval, runEval+  )+import ClassyPrelude.Conduit+import Data.Biapplicative        (Biapplicative, bipure, (<<*>>))+import Data.Bifoldable           (Bifoldable, bifoldr, bifold, bifoldMap, bitraverse_, bisequenceA_, bifor_)+import Data.Bitraversable        (Bitraversable, bitraverse, bisequenceA, bifor)+import Data.Conduit.Async+import Data.Conduit.TQueue+import Data.MonoTraversable.Instances ()+import Lens.Micro.Platform+import Lens.Micro.Contra++parFork :: Par () -> Par ()+parFork = Par.fork++parNew :: Par (IVar a)+parNew = Par.new++parNewFull :: NFData a => a -> Par (IVar a)+parNewFull = Par.newFull++parGet :: IVar a -> Par a+parGet = Par.get++parPut :: NFData a => IVar a -> a -> Par ()+parPut = Par.put++parSpawn :: NFData a => Par a -> Par (IVar a)+parSpawn = Par.spawn++parParMap :: (Traversable t, NFData b, ParFuture iv p) => (a -> b) -> t a -> p (t b)+parParMap = Par.parMap++thru :: a -> Strategy a -> a+x `thru` strat = x `Strategies.using` strat
+ stack.yaml view
@@ -0,0 +1,6 @@+resolver: nightly-2016-08-06+packages:+- '.'+extra-deps: []+flags: {}+extra-package-dbs: []