liquid-fixpoint-0.8.10.2: Predicate Abstraction-based Horn-Clause/Implication Constraint Solver
Safe HaskellNone
LanguageHaskell98

Language.Fixpoint.Misc

Synopsis

Documentation

type (|->) a b = HashMap a b Source #

firstMaybe :: (a -> Maybe b) -> [a] -> Maybe b Source #

asyncMapM :: (a -> IO b) -> [a] -> IO [b] Source #

traceShow :: Show a => String -> a -> a Source #

hashMapToAscList :: Ord a => HashMap a b -> [(a, b)] Source #

findNearest :: (Ord i, Num i) => i -> [(i, a)] -> Maybe a Source #

argMin :: Ord k => [(k, v)] -> Maybe v Source #

headMb :: [a] -> Maybe a Source #

getUniqueInt :: IO Int Source #

Unique Int -----------------------------------------------

editDistance :: Eq a => [a] -> [a] -> Int Source #

Edit Distance --------------------------------------------

data Moods Source #

Constructors

Ok 
Loud 
Sad 
Happy 
Angry 
Wary 

moodColor :: Moods -> Color Source #

withColor :: Color -> IO () -> IO () Source #

wrap :: [a] -> [a] -> [a] -> [a] Source #

repeats :: Int -> [a] -> [a] Source #

errorstar :: (?callStack :: CallStack) => String -> a Source #

fst3 :: (a, b, c) -> a Source #

snd3 :: (a, b, c) -> b Source #

thd3 :: (a, b, c) -> c Source #

secondM :: Functor f => (b -> f c) -> (a, b) -> f (a, c) Source #

mlookup :: (?callStack :: CallStack, Eq k, Show k, Hashable k) => HashMap k v -> k -> v Source #

safeLookup :: (?callStack :: CallStack, Eq k, Hashable k) => String -> k -> HashMap k v -> v Source #

mfromJust :: (?callStack :: CallStack) => String -> Maybe a -> a Source #

inserts :: (Eq k, Hashable k) => k -> v -> HashMap k [v] -> HashMap k [v] Source #

removes :: (Eq k, Hashable k, Eq v) => k -> v -> HashMap k [v] -> HashMap k [v] Source #

count :: (Eq k, Hashable k) => [k] -> [(k, Int)] Source #

group :: (Eq k, Hashable k) => [(k, v)] -> HashMap k [v] Source #

groupBase :: (Eq k, Hashable k) => HashMap k [v] -> [(k, v)] -> HashMap k [v] Source #

groupList :: (Eq k, Hashable k) => [(k, v)] -> [(k, [v])] Source #

groupMap :: (Eq k, Hashable k) => (a -> k) -> [a] -> HashMap k [a] Source #

allMap :: (Eq k, Hashable k) => (v -> Bool) -> HashMap k v -> Bool Source #

hashNub :: (Eq k, Hashable k) => [k] -> [k] Source #

sortNub :: Ord a => [a] -> [a] Source #

nubOrd :: Eq a => [a] -> [a] Source #

hashNubWith :: (Eq b, Hashable b) => (a -> b) -> [a] -> [a] Source #

mFromList :: (Eq k, Hashable k) => [(k, v)] -> HashMap k v Source #

duplicates :: (Eq k, Hashable k) => [k] -> [k] Source #

safeZip :: (?callStack :: CallStack) => String -> [a] -> [b] -> [(a, b)] Source #

safeZipWith :: (?callStack :: CallStack) => String -> (a -> b -> c) -> [a] -> [b] -> [c] Source #

type ListNE a = [a] Source #

safeHead :: (?callStack :: CallStack) => String -> ListNE a -> a Source #

safeLast :: (?callStack :: CallStack) => String -> ListNE a -> a Source #

safeInit :: (?callStack :: CallStack) => String -> ListNE a -> [a] Source #

safeUncons :: (?callStack :: CallStack) => String -> ListNE a -> (a, [a]) Source #

safeUnsnoc :: (?callStack :: CallStack) => String -> ListNE a -> ([a], a) Source #

safeFromList :: (?callStack :: CallStack, Eq k, Hashable k, Show k) => String -> [(k, v)] -> HashMap k v Source #

applyNonNull :: b -> ([a] -> b) -> [a] -> b Source #

tshow :: Show a => a -> Doc Source #

writeLoud :: String -> IO () Source #

If loud, write a string to stdout

singleton :: a -> [a] Source #

pair :: a -> a -> [a] Source #

triple :: a -> a -> a -> [a] Source #

fM :: Monad m => (a -> b) -> a -> m b Source #

whenM :: Monad m => m Bool -> m () -> m () Source #

ifM :: Monad m => m Bool -> m a -> m a -> m a Source #

mapEither :: (a -> Either b c) -> [a] -> ([b], [c]) Source #

componentsWith :: Ord c => (a -> [(b, c, [c])]) -> a -> [[b]] Source #

topoSortWith :: Ord v => (a -> (v, [v])) -> [a] -> [a] Source #

sccsWith :: Ord v => (a -> (v, [v])) -> [a] -> [[a]] Source #

>>> let em = M.fromList [ (1, [2, 3]), (2, [1, 3]), (3, []   ) ]
>>> let ef = \v -> (v, M.lookupDefault [] v em)
>>> sccsWith ef [1,2,3]
[[3],[1,2]] 

type EqHash a = (Eq a, Ord a, Hashable a) Source #

coalesce :: EqHash v => [ListNE v] -> [ListNE v] Source #

coalesceEdges :: EqHash v => [ListNE v] -> [(v, v, [v])] Source #

mapFst :: (a -> c) -> (a, b) -> (c, b) Source #

mapSnd :: (b -> c) -> (a, b) -> (a, c) Source #

allCombinations :: [[a]] -> [[a]] Source #

powerset :: [a] -> [[a]] Source #

(=>>) :: Monad m => m b -> (b -> m a) -> m b Source #

(<<=) :: Monad m => (b -> m a) -> m b -> m b Source #

(<$$>) :: Monad m => (a -> m b) -> [a] -> m [b] Source #

revMapM :: Monad m => (a -> m b) -> [a] -> m [b] Source #

nubDiff :: (Eq a, Hashable a) => [a] -> [a] -> HashSet a Source #

fold1M :: Monad m => (a -> a -> m a) -> [a] -> m a Source #