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

Feldspar.Core.Show

Description

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

Synopsis

Documentation

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 :: Bool -> Node -> [Hierarchy] -> StringSource

Shows a single node.

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

showSubFun showSize 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. showSize decides whether or not to show size comments.

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

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

showGraph :: Bool -> 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.