feldspar-language-0.3.1: A functional embedded language for DSP and parallelismSource codeContentsIndex
Feldspar.Utils
Description
General utility functions
Synopsis
allEqual :: Eq a => [a] -> Bool
showSeq :: String -> [String] -> String -> String
appendFirstLine :: String -> String -> String
(!!!) :: Ord a => Map a [b] -> a -> [b]
invertMap :: (Ord a, Ord b) => Map a b -> Map b [a]
topSort :: Ord a => Map a [a] -> [a]
Documentation
allEqual :: Eq a => [a] -> BoolSource
Checks if all elements in the list are equal.
showSeq :: String -> [String] -> String -> StringSource

showSeq open strs close:

Shows the strings strs separated by commas and enclosed within the open and close strings.

appendFirstLine :: String -> String -> StringSource
Append the first argument to the first line of the second argument.
(!!!) :: Ord a => Map a [b] -> a -> [b]Source
A Map lookup that treats undefined keys as mapping to empty lists.
invertMap :: (Ord a, Ord b) => Map a b -> Map b [a]Source
Inverts a Map. The argument map may have several keys mapping to the same element, so the inverted map has a list of elements for each key.
topSort :: Ord a => Map a [a] -> [a]Source
Topological sort. Lists the nodes in the map such that each node appears before its children. The function only terminates for acyclic maps.
Produced by Haddock version 2.6.1