Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Base
Contents
Description
Synopsis
- class IntGraph g where
- intgraph_post :: g -> Int -> IntSet
- intgraph_V :: g -> IntSet
- showHex :: Integral a => a -> String
- showHex_list :: Integral a => [a] -> [Char]
- showHex_set :: IntSet -> [Char]
- showHex_option :: Integral a => Maybe a -> String
- readHex' :: (Eq a, Num a) => String -> a
- show_set :: (Foldable t, Show a) => t a -> String
- im_lookup :: [Char] -> IntMap a -> Key -> a
- orElse :: Eq a => Maybe a -> a -> a
- orTry :: Eq a => Maybe a -> Maybe a -> Maybe a
- orElseM :: Monad m => m (Maybe a) -> m a -> m a
- orTryM :: Monad m => m (Maybe a) -> m (Maybe a) -> m (Maybe a)
- onlyWhen :: Bool -> a -> Maybe a
- existsAndSatisfies :: Maybe t -> (t -> Bool) -> Bool
- firstJustsM :: (Monad m, Foldable f) => f (m (Maybe a)) -> m (Maybe a)
- pair :: a -> b -> (a, b)
- findString :: Eq a => [a] -> [a] -> Maybe Int
- takeUntilString :: String -> String -> String
- strip_parentheses :: [Char] -> [Char]
- partitionWith :: (a -> Either b c) -> [a] -> ([b], [c])
- bytes_to_word :: [Word8] -> Word64
- word_to_sint :: Int -> Word64 -> Int
- average :: (Real a, Fractional b) => [a] -> b
- crossProduct :: [[a]] -> [[a]]
- crossProduct_size :: Foldable t => [t a] -> Int
- neFromList :: Ord a => [a] -> NESet a
- neSetToList :: NESet a -> [a]
- quotientBy :: Ord a => (a -> a -> Bool) -> Set a -> Set (Set a)
- quotientByL :: Ord a => (a -> a -> Bool) -> [a] -> [[a]]
- sextend_32_64 :: (Bits a, Num a) => a -> a
- sextend_16_64 :: (Bits a, Num a) => a -> a
- sextend_8_64 :: (Bits a, Num a) => a -> a
- sextend_16_32 :: (Bits a, Num a) => a -> a
- sextend_8_32 :: (Bits a, Num a) => a -> a
- sextend_8_16 :: (Bits a, Num a) => a -> a
- round2dp :: Double -> Double
- data Graph = Edges (IntMap IntSet)
- graph_add_edges :: Graph -> Key -> IntSet -> Graph
- graph_delete :: Graph -> Key -> Graph
- graph_is_parent :: Graph -> Key -> Bool
- graph_is_vertex :: Graph -> Key -> Bool
- graph_is_edge :: Graph -> Key -> Key -> Bool
- try_find_end_node_from_node :: Graph -> Int -> Maybe Int
- putNESetOf :: Putter a -> Putter (NESet a)
- getNESetOf :: Ord a => Get a -> Get (NESet a)
- hex_color_of_text :: String -> String
- hex_colors :: [String]
- allp :: [a -> Bool] -> a -> Bool
Documentation
showHex_list :: Integral a => [a] -> [Char] Source #
Show an integer list as hex-list.
showHex_set :: IntSet -> [Char] Source #
Show an integer set as hex-list.
showHex_option :: Integral a => Maybe a -> String Source #
Show an optional integer as an optional hex.
im_lookup :: [Char] -> IntMap a -> Key -> a Source #
Lookup and produce error message if key does not exists in map.
existsAndSatisfies :: Maybe t -> (t -> Bool) -> Bool Source #
A value exists (is not Nothing) and satisfies the predicate
firstJustsM :: (Monad m, Foldable f) => f (m (Maybe a)) -> m (Maybe a) Source #
Takes computations returnings Maybes
; tries each one in order.
The first one to return a Just
wins. Returns Nothing
if all computations
return Nothing
.
strip_parentheses :: [Char] -> [Char] Source #
Strip outer parentheses from a string, if it has them.
partitionWith :: (a -> Either b c) -> [a] -> ([b], [c]) Source #
Uses a function to determine which of two output lists an input element should join
bytes_to_word :: [Word8] -> Word64 Source #
In little endian, convert a byte-list to a 64 bit word. Assume the list is at most length 8.
word_to_sint :: Int -> Word64 -> Int Source #
Convert first n
bytes of a word to an integer.
Assume n<8
.
average :: (Real a, Fractional b) => [a] -> b Source #
average of list of numbers
crossProduct :: [[a]] -> [[a]] Source #
crossProduct_size :: Foldable t => [t a] -> Int Source #
neFromList :: Ord a => [a] -> NESet a Source #
neSetToList :: NESet a -> [a] Source #
quotientByL :: Ord a => (a -> a -> Bool) -> [a] -> [[a]] Source #
sextend_32_64 :: (Bits a, Num a) => a -> a Source #
Sign-extension from 32 to 64 bits
sextend_16_64 :: (Bits a, Num a) => a -> a Source #
Sign-extension from 16 to 64 bits
sextend_8_64 :: (Bits a, Num a) => a -> a Source #
Sign-extension from 8 to 64 bits
sextend_16_32 :: (Bits a, Num a) => a -> a Source #
Sign-extension from 16 to 32 bits
sextend_8_32 :: (Bits a, Num a) => a -> a Source #
Sign-extension from 8 to 32 bits
sextend_8_16 :: (Bits a, Num a) => a -> a Source #
Sign-extension from 8 to 16 bits
Generic graph with ints as vertices.
try_find_end_node_from_node :: Graph -> Int -> Maybe Int Source #
Find an end (terminal node) reachable from the given node v0
hex_color_of_text :: String -> String Source #
decide whether text should be white or black based on background color
hex_colors :: [String] Source #
A list of RGB colors