MuCheck-0.1.2.2: Automated Mutation Testing

Safe HaskellSafe-Inferred
LanguageHaskell2010

MuCheck.Utils.Common

Synopsis

Documentation

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

The choose function generates subsets of a given size

coupling :: Eq a => (a -> a -> t) -> [a] -> [t] Source

The coupling function produces all possible pairings, and applies the given function to each

genFileNames :: String -> [String] Source

The genFileNames function lazily generates filenames of mutants

replace :: Eq a => (a, a) -> [a] -> [a] Source

The replace function replaces first element in a list given old and new values as a pair

safeHead :: [a] -> Maybe a Source

The safeHead function safely extracts head of a list using Maybe

sample :: (RandomGen g, Num n, Eq n) => g -> n -> [t] -> [t] Source

The sample function takes a random generator and chooses a random sample subset of given size.

sampleF :: (RandomGen g, Num n) => g -> Rational -> [t] -> [t] Source

The sampleF function takes a random generator, and a fraction and returns subset of size given by fraction

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

The remElt function removes element at index specified from a list