HMock-0.2.0.0: A flexible mock framework for testing effectful code.
Safe HaskellNone
LanguageHaskell2010

Test.HMock.Internal.Util

Description

Internal utilities used for HMock implementation.

Synopsis

Documentation

data Located a Source #

A value together with its source location.

Constructors

Loc (Maybe String) a 

Instances

Instances details
Functor Located Source # 
Instance details

Defined in Test.HMock.Internal.Util

Methods

fmap :: (a -> b) -> Located a -> Located b #

(<$) :: a -> Located b -> Located a #

Eq a => Eq (Located a) Source # 
Instance details

Defined in Test.HMock.Internal.Util

Methods

(==) :: Located a -> Located a -> Bool #

(/=) :: Located a -> Located a -> Bool #

Ord a => Ord (Located a) Source # 
Instance details

Defined in Test.HMock.Internal.Util

Methods

compare :: Located a -> Located a -> Ordering #

(<) :: Located a -> Located a -> Bool #

(<=) :: Located a -> Located a -> Bool #

(>) :: Located a -> Located a -> Bool #

(>=) :: Located a -> Located a -> Bool #

max :: Located a -> Located a -> Located a #

min :: Located a -> Located a -> Located a #

locate :: CallStack -> a -> Located a Source #

Annotates a value with its source location from the call stack.

withLoc :: Located String -> String Source #

Formats a Located String to include its source location.

choices :: [a] -> [(a, [a])] Source #

Returns all ways to choose one element from a list, and the corresponding remaining list.

isSubsequenceOf :: (IsSequence t, Eq (Element t)) => t -> t -> Bool Source #

Checks if one sequence is a subsequence of another.