| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Utils.Misc
- envIsSet :: String -> Bool
- getEnvMaybe :: String -> Maybe String
- subsetOf :: Ord a => [a] -> [a] -> Bool
- noDuplicates :: Ord a => [a] -> Bool
- equivClasses :: (Ord a, Ord b) => [(a, b)] -> Map b (Set a)
- whileTrue :: Monad m => m Bool -> m Int
- stringSHA256 :: String -> String
- setAny :: (a -> Bool) -> Set a -> Bool
- invertMap :: Ord v => Map k v -> Map v k
- unsafeEq :: a -> a -> Bool
Environment
envIsSet k returns True if there is a v such k=v is in the environment and False otherwise.
getEnvMaybe :: String -> Maybe String #
getEnvMaybe k returns Just v if k=v is in the environment and Nothing otherwise
List operations
noDuplicates :: Ord a => [a] -> Bool #
noDuplicates xs returns True if the list xs contains no duplicates
equivClasses :: (Ord a, Ord b) => [(a, b)] -> Map b (Set a) #
Compute the equality classes given wrto a partial function.
Control
whileTrue :: Monad m => m Bool -> m Int #
whileTrue m iterates m until it returns False.
Returns the number of iterations m was run. 0
means m never returned True.
Hashing
stringSHA256 :: String -> String #
The SHA-256 hash of a string in base64 notation.