Copyright | (c) 2017 Rudy Matela |
---|---|
License | 3-Clause BSD (see the file LICENSE) |
Maintainer | Rudy Matela <rudy@matela.com.br> |
Safe Haskell | None |
Language | Haskell2010 |
This module is part of Extrapolate, a library for generalization of counter-examples.
This module re-exports some functionality from Test.Speculate.Expr, but instead of working on single expressions it works in lists of expressions (the choosen representation for counter-examples).
Synopsis
- type Exprs = [Expr]
- canonicalizeWith :: Instances -> [Expr] -> [Expr]
- grounds :: Instances -> [Expr] -> [[Expr]]
- groundsAndBinds :: Instances -> [Expr] -> [(Binds, [Expr])]
- vassignments :: [Expr] -> [[Expr]]
- vars :: [Expr] -> [(TypeRep, String)]
- fold :: [Expr] -> Expr
- unfold :: Expr -> [Expr]
- isAssignmentTest :: Instances -> Int -> Expr -> Bool
- nameWith :: Typeable a => String -> a -> Instances
- type TypeRep = SomeTypeRep
- canonicalWith :: Instances -> Expr -> Bool
- canonicalize :: Expr -> Expr
- ($$) :: Expr -> Expr -> Maybe Expr
- arity :: Expr -> Int
- atomicConstants :: Expr -> [Expr]
- compareComplexity :: Expr -> Expr -> Ordering
- compareComplexityThen :: (Expr -> Expr -> Ordering) -> Expr -> Expr -> Ordering
- constant :: Typeable a => String -> a -> Expr
- consts :: Expr -> [Expr]
- countHoles :: TypeRep -> Expr -> Int
- countVar :: TypeRep -> String -> Expr -> Int
- countVars :: Expr -> [(TypeRep, String, Int)]
- depthE :: Expr -> Int
- eqExprCommuting :: [Expr] -> Expr -> Expr -> Bool
- etyp :: Expr -> Either Expr TypeRep
- eval :: Typeable a => a -> Expr -> a
- evaluate :: Typeable a => Expr -> Maybe a
- falseE :: Expr
- hasVar :: Expr -> Bool
- hole :: (Listable a, Typeable a) => a -> Expr
- holeOfTy :: TypeRep -> Expr
- holes :: Expr -> [TypeRep]
- isAssignment :: Expr -> Bool
- isConstantNamed :: Expr -> String -> Bool
- isSub :: Expr -> Expr -> Bool
- isTuple :: Expr -> Bool
- lengthE :: Expr -> Int
- lexicompare :: Expr -> Expr -> Ordering
- lexicompareBy :: (Expr -> Expr -> Ordering) -> Expr -> Expr -> Ordering
- showConstant :: (Typeable a, Show a) => a -> Expr
- showExpr :: Expr -> String
- showOpExpr :: String -> Expr -> String
- showPrecExpr :: Int -> Expr -> String
- showsOpExpr :: String -> Expr -> String -> String
- showsPrecExpr :: Int -> Expr -> String -> String
- subexprs :: Expr -> [Expr]
- subexprsV :: Expr -> [Expr]
- typ :: Expr -> TypeRep
- typeCorrect :: Expr -> Bool
- unfoldApp :: Expr -> [Expr]
- unfoldTuple :: Expr -> [Expr]
- unrepeatedVars :: Expr -> Bool
- var :: (Listable a, Typeable a) => String -> a -> Expr
- comparisonLE :: Instances -> Expr -> Expr -> Maybe Expr
- comparisonLT :: Instances -> Expr -> Expr -> Maybe Expr
- conditionalComparisonLE :: Instances -> Expr -> Expr -> Expr -> Maybe Expr
- conditionalComparisonLT :: Instances -> Expr -> Expr -> Expr -> Maybe Expr
- conditionalEquation :: Instances -> Expr -> Expr -> Expr -> Maybe Expr
- equation :: Instances -> Expr -> Expr -> Maybe Expr
- implication :: Expr -> Expr -> Maybe Expr
- inequality :: Instances -> Expr -> Expr -> Maybe Expr
- isEquation :: Expr -> Bool
- phonyEquation :: Expr -> Expr -> Expr
- unComparison :: Expr -> (Expr, Expr)
- unConditionalComparison :: Expr -> (Expr, Expr, Expr)
- unConditionalEquation :: Expr -> (Expr, Expr, Expr)
- unEquation :: Expr -> (Expr, Expr)
- unImplication :: Expr -> (Expr, Expr)
- usefulConditionalEquation :: Expr -> Bool
- usefulEquation :: Expr -> Bool
- usefulImplication :: Expr -> Bool
- uselessEquation :: Expr -> Bool
- condEqual :: Instances -> Int -> Expr -> Expr -> Expr -> Bool
- condEqualM :: Instances -> Int -> Int -> Expr -> Expr -> Expr -> Bool
- equal :: Instances -> Int -> Expr -> Expr -> Bool
- false :: Instances -> Int -> Expr -> Bool
- groundAndBinds :: Instances -> Expr -> [(Binds, Expr)]
- groundBinds :: Instances -> Expr -> [Binds]
- inequal :: Instances -> Int -> Expr -> Expr -> Bool
- less :: Instances -> Int -> Expr -> Expr -> Bool
- lessOrEqual :: Instances -> Int -> Expr -> Expr -> Bool
- true :: Instances -> Int -> Expr -> Bool
- trueBinds :: Instances -> Int -> Expr -> [Binds]
- trueRatio :: Instances -> Int -> Expr -> Ratio Int
- defNames :: [String]
- eq :: (Typeable a, Eq a) => a -> Instances
- eqE :: Instances -> TypeRep -> Maybe Expr
- eqOrd :: (Typeable a, Eq a, Ord a) => a -> Instances
- eqWith :: (Typeable a, Eq a) => (a -> a -> Bool) -> Instances
- findInfo :: (Instance -> Maybe a) -> Instances -> Maybe a
- instanceType :: Instance -> TypeRep
- iqE :: Instances -> TypeRep -> Maybe Expr
- isEq :: Instances -> TypeRep -> Bool
- isEqE :: Instances -> Expr -> Bool
- isEqOrd :: Instances -> TypeRep -> Bool
- isEqOrdE :: Instances -> Expr -> Bool
- isListable :: Instances -> TypeRep -> Bool
- isOrd :: Instances -> TypeRep -> Bool
- isOrdE :: Instances -> Expr -> Bool
- leE :: Instances -> TypeRep -> Maybe Expr
- listable :: (Typeable a, Show a, Listable a) => a -> Instances
- listableWith :: (Typeable a, Show a) => [[a]] -> Instances
- ltE :: Instances -> TypeRep -> Maybe Expr
- names :: Instances -> TypeRep -> [String]
- ord :: (Typeable a, Ord a) => a -> Instances
- ordWith :: (Typeable a, Ord a) => (a -> a -> Bool) -> Instances
- preludeInstances :: Instances
- tiersE :: Instances -> TypeRep -> [[Expr]]
- assign :: String -> Expr -> Expr -> Expr
- assigning :: Expr -> Binds -> Expr
- fill :: Expr -> [Expr] -> Expr
- hasCanonInstanceOf :: Expr -> Expr -> Bool
- hasInstanceOf :: Expr -> Expr -> Bool
- isCanonInstanceOf :: Expr -> Expr -> Bool
- isInstanceOf :: Expr -> Expr -> Bool
- match :: Expr -> Expr -> Maybe Binds
- match2 :: (Expr, Expr) -> (Expr, Expr) -> Maybe Binds
- matchWith :: Binds -> Expr -> Expr -> Maybe Binds
- renameBy :: (String -> String) -> Expr -> Expr
- sub :: Expr -> Expr -> Expr -> Expr
- unification :: Expr -> Expr -> Maybe Binds
- unify :: Expr -> Expr -> Maybe Expr
- boolTy :: TypeRep
- mkEqnTy :: TypeRep -> TypeRep
- data Expr
- data Instance = Instance String TypeRep [Expr]
- type Instances = [Instance]
- type Binds = [(String, Expr)]
Documentation
vassignments :: [Expr] -> [[Expr]] Source #
type TypeRep = SomeTypeRep #
A quantified type representation.
canonicalWith :: Instances -> Expr -> Bool #
canonicalize :: Expr -> Expr #
atomicConstants :: Expr -> [Expr] #
compareComplexity :: Expr -> Expr -> Ordering #
countHoles :: TypeRep -> Expr -> Int #
isAssignment :: Expr -> Bool #
isConstantNamed :: Expr -> String -> Bool #
lexicompare :: Expr -> Expr -> Ordering #
showConstant :: (Typeable a, Show a) => a -> Expr #
showOpExpr :: String -> Expr -> String #
showPrecExpr :: Int -> Expr -> String #
typeCorrect :: Expr -> Bool #
unfoldTuple :: Expr -> [Expr] #
unrepeatedVars :: Expr -> Bool #
isEquation :: Expr -> Bool #
phonyEquation :: Expr -> Expr -> Expr #
unComparison :: Expr -> (Expr, Expr) #
unEquation :: Expr -> (Expr, Expr) #
unImplication :: Expr -> (Expr, Expr) #
usefulConditionalEquation :: Expr -> Bool #
usefulEquation :: Expr -> Bool #
usefulImplication :: Expr -> Bool #
uselessEquation :: Expr -> Bool #
groundBinds :: Instances -> Expr -> [Binds] #
instanceType :: Instance -> TypeRep #
isListable :: Instances -> TypeRep -> Bool #
listableWith :: (Typeable a, Show a) => [[a]] -> Instances #
hasCanonInstanceOf :: Expr -> Expr -> Bool #
hasInstanceOf :: Expr -> Expr -> Bool #
isCanonInstanceOf :: Expr -> Expr -> Bool #
isInstanceOf :: Expr -> Expr -> Bool #