base-4.3.1.0: Basic libraries

Portability | non-portable (GHC Extensions) Basic implementation of Parallel Arrays. This module has two functions: (1) It defines the interface to the parallel array extension of the Prelude and (2) it provides a vanilla implementation of parallel arrays that does not require to flatten the array code. The implementation is not very optimised.
Stability | internal
Maintainer | Manuel M. T. Chakravarty <chak@cse.unsw.edu.au>

GHC.PArr

Description

Synopsis

- mapP :: (a -> b) -> [:a:] -> [:b:]
- (+:+) :: [:a:] -> [:a:] -> [:a:]
- filterP :: (a -> Bool) -> [:a:] -> [:a:]
- concatP :: [:[:a:]:] -> [:a:]
- concatMapP :: (a -> [:b:]) -> [:a:] -> [:b:]
- nullP :: [:a:] -> Bool
- lengthP :: [:a:] -> Int
- (!:) :: [:a:] -> Int -> a
- foldlP :: (a -> b -> a) -> a -> [:b:] -> a
- foldl1P :: (a -> a -> a) -> [:a:] -> a
- scanlP :: (a -> b -> a) -> a -> [:b:] -> [:a:]
- scanl1P :: (a -> a -> a) -> [:a:] -> [:a:]
- foldrP :: (a -> b -> b) -> b -> [:a:] -> b
- foldr1P :: (a -> a -> a) -> [:a:] -> a
- scanrP :: (a -> b -> b) -> b -> [:a:] -> [:b:]
- scanr1P :: (a -> a -> a) -> [:a:] -> [:a:]
- singletonP :: a -> [:a:]
- emptyP :: [:a:]
- replicateP :: Int -> a -> [:a:]
- takeP :: Int -> [:a:] -> [:a:]
- dropP :: Int -> [:a:] -> [:a:]
- splitAtP :: Int -> [:a:] -> ([:a:], [:a:])
- takeWhileP :: (a -> Bool) -> [:a:] -> [:a:]
- dropWhileP :: (a -> Bool) -> [:a:] -> [:a:]
- spanP :: (a -> Bool) -> [:a:] -> ([:a:], [:a:])
- breakP :: (a -> Bool) -> [:a:] -> ([:a:], [:a:])
- reverseP :: [:a:] -> [:a:]
- andP :: [:Bool:] -> Bool
- orP :: [:Bool:] -> Bool
- anyP :: (a -> Bool) -> [:a:] -> Bool
- allP :: (a -> Bool) -> [:a:] -> Bool
- elemP :: Eq a => a -> [:a:] -> Bool
- notElemP :: Eq a => a -> [:a:] -> Bool
- lookupP :: Eq a => a -> [:(a, b):] -> Maybe b
- sumP :: Num a => [:a:] -> a
- productP :: Num a => [:a:] -> a
- maximumP :: Ord a => [:a:] -> a
- minimumP :: Ord a => [:a:] -> a
- zipP :: [:a:] -> [:b:] -> [:(a, b):]
- zip3P :: [:a:] -> [:b:] -> [:c:] -> [:(a, b, c):]
- zipWithP :: (a -> b -> c) -> [:a:] -> [:b:] -> [:c:]
- zipWith3P :: (a -> b -> c -> d) -> [:a:] -> [:b:] -> [:c:] -> [:d:]
- unzipP :: [:(a, b):] -> ([:a:], [:b:])
- unzip3P :: [:(a, b, c):] -> ([:a:], [:b:], [:c:])
- enumFromToP :: Enum a => a -> a -> [:a:]
- enumFromThenToP :: Enum a => a -> a -> a -> [:a:]
- toP :: [a] -> [:a:]
- fromP :: [:a:] -> [a]
- sliceP :: Int -> Int -> [:e:] -> [:e:]
- foldP :: (e -> e -> e) -> e -> [:e:] -> e
- fold1P :: (e -> e -> e) -> [:e:] -> e
- permuteP :: [:Int:] -> [:e:] -> [:e:]
- bpermuteP :: [:Int:] -> [:e:] -> [:e:]
- dpermuteP :: [:Int:] -> [:e:] -> [:e:] -> [:e:]
- crossP :: [:a:] -> [:b:] -> [:(a, b):]
- crossMapP :: [:a:] -> (a -> [:b:]) -> [:(a, b):]
- indexOfP :: (a -> Bool) -> [:a:] -> [:Int:]

# Documentation

mapP :: (a -> b) -> [:a:] -> [:b:]Source

(+:+) :: [:a:] -> [:a:] -> [:a:]Source

filterP :: (a -> Bool) -> [:a:] -> [:a:]Source

concatP :: [:[:a:]:] -> [:a:]Source

concatMapP :: (a -> [:b:]) -> [:a:] -> [:b:]Source

nullP :: [:a:] -> Bool Source

lengthP :: [:a:] -> Int Source

(!:) :: [:a:] -> Int -> aSource

foldlP :: (a -> b -> a) -> a -> [:b:] -> aSource

foldl1P :: (a -> a -> a) -> [:a:] -> aSource

scanlP :: (a -> b -> a) -> a -> [:b:] -> [:a:]Source

scanl1P :: (a -> a -> a) -> [:a:] -> [:a:]Source

foldrP :: (a -> b -> b) -> b -> [:a:] -> bSource

foldr1P :: (a -> a -> a) -> [:a:] -> aSource

scanrP :: (a -> b -> b) -> b -> [:a:] -> [:b:]Source

scanr1P :: (a -> a -> a) -> [:a:] -> [:a:]Source

singletonP :: a -> [:a:]Source

emptyP :: [:a:]Source

replicateP :: Int -> a -> [:a:]Source

takeP :: Int -> [:a:] -> [:a:]Source

dropP :: Int -> [:a:] -> [:a:]Source

splitAtP :: Int -> [:a:] -> ([:a:], [:a:])Source

takeWhileP :: (a -> Bool) -> [:a:] -> [:a:]Source

dropWhileP :: (a -> Bool) -> [:a:] -> [:a:]Source

spanP :: (a -> Bool) -> [:a:] -> ([:a:], [:a:])Source

breakP :: (a -> Bool) -> [:a:] -> ([:a:], [:a:])Source

reverseP :: [:a:] -> [:a:]Source

andP :: [:Bool:] -> Bool Source

orP :: [:Bool:] -> Bool Source

anyP :: (a -> Bool) -> [:a:] -> Bool Source

allP :: (a -> Bool) -> [:a:] -> Bool Source

elemP :: Eq a => a -> [:a:] -> Bool Source

notElemP :: Eq a => a -> [:a:] -> Bool Source

lookupP :: Eq a => a -> [:(a, b):] -> Maybe bSource

sumP :: Num a => [:a:] -> aSource

productP :: Num a => [:a:] -> aSource

maximumP :: Ord a => [:a:] -> aSource

minimumP :: Ord a => [:a:] -> aSource

zipP :: [:a:] -> [:b:] -> [:(a, b):]Source

zip3P :: [:a:] -> [:b:] -> [:c:] -> [:(a, b, c):]Source

zipWithP :: (a -> b -> c) -> [:a:] -> [:b:] -> [:c:]Source

zipWith3P :: (a -> b -> c -> d) -> [:a:] -> [:b:] -> [:c:] -> [:d:]Source

unzipP :: [:(a, b):] -> ([:a:], [:b:])Source

unzip3P :: [:(a, b, c):] -> ([:a:], [:b:], [:c:])Source

enumFromToP :: Enum a => a -> a -> [:a:]Source

enumFromThenToP :: Enum a => a -> a -> a -> [:a:]Source

toP :: [a] -> [:a:]Source

fromP :: [:a:] -> [a]Source

sliceP :: Int -> Int -> [:e:] -> [:e:]Source

foldP :: (e -> e -> e) -> e -> [:e:] -> eSource

fold1P :: (e -> e -> e) -> [:e:] -> eSource

permuteP :: [:Int:] -> [:e:] -> [:e:]Source

bpermuteP :: [:Int:] -> [:e:] -> [:e:]Source

dpermuteP :: [:Int:] -> [:e:] -> [:e:] -> [:e:]Source

crossP :: [:a:] -> [:b:] -> [:(a, b):]Source

crossMapP :: [:a:] -> (a -> [:b:]) -> [:(a, b):]Source

Compute a cross of an array and the arrays produced by the given function for the elements of the first array.

indexOfP :: (a -> Bool) -> [:a:] -> [:Int:]Source