preliminaries-0.1.1.0: A larger alternative to the Prelude.

Copyright© Yghor Kerscher, 2016
LicenseBSD-3
Maintainerkerscher@acm.org
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Preliminaries

Contents

Description

The Haskell Report specifies the 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:

Preliminaries is one of such alternatives and builds upon classy-prelude, with the following functionality out-of-the-box:

  • Data manipulation — i.e. microlens
  • Streaming
  • Concurrency
  • Parallelism
  • Read-only, write-only and read-write environments — i.e. mtl

To use it, put the following on your .cabal file, ignoring the “…” for ommited parts:

…
default-extensions: NoImplicitPrelude
build-depends:      preliminaries >= 0.1.1 < 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.

Synopsis

Data manipulation

Concurrency

Parallelism

parFork :: Par () -> Par () Source #

parNewFull :: NFData a => a -> Par (IVar a) Source #

parGet :: IVar a -> Par a Source #

parPut :: NFData a => IVar a -> a -> Par () Source #

parSpawn :: NFData a => Par a -> Par (IVar a) Source #

parParMap :: (Traversable t, NFData b, ParFuture iv p) => (a -> b) -> t a -> p (t b) Source #

thru :: a -> Strategy a -> a Source #

Environments

Re-exports

Utilities

type ($) f x = f x Source #