feldspar-language-0.1: A functional embedded language for DSP and parallelism



Defines a function showGraph for showing core language graphs as Haskell code.



tupPatt :: Tuple StorableType -> NodeId -> Tuple VariableSource

Creates a tuple pattern of the given type, for the output of the given node.

viewBinOp :: String -> Maybe StringSource

Matches the string against "(...)", and returns Just ... if possible, otherwise Nothing.

showNode :: Node -> [Hierarchy] -> StringSource

Shows a single node. The first argument associates each sub-function with the nodes it owns.

showSubFun :: (HaskellValue inp, HaskellValue outp) => Hierarchy -> String -> Maybe inp -> outp -> StringSource

showSubFun hier name inp outp:

Shows a sub-function named name represented by the hierarchy hier. If inp is Nothing, it will be shown as a definition without an argument.

showSF :: (HaskellValue inp, HaskellValue outp) => Hierarchy -> String -> inp -> outp -> StringSource

showSF hier name inp = showSubFun hier name (Just inp)

showGraph :: String -> Bool -> Graph -> StringSource

Shows a graph. The given string is the name of the top-level function. The Boolean tells whether the graph has a real or a dummy argument. A graphs with that has a dummy argument will be shown as a definition without an argument. Of course, this assumes that a dummy argument is not used within the graph.