feldspar-language-0.3.1: A functional embedded language for DSP and parallelismSource codeContentsIndex
Feldspar.Core.Reify
Description
Functions for reifying expressions (Data / Expr) to graphs (Graph) and to textual format.
Synopsis
class Program a where
reify :: a -> Graph
numArgs :: T a -> Int
showCore :: forall a. Program a => a -> String
showCoreWithSize :: forall a. Program a => a -> String
printCore :: Program a => a -> IO ()
printCoreWithSize :: Program a => a -> IO ()
runGraph :: Reify a -> Info -> (a, ([Node], Info))
buildSubFun :: forall a b. (Typeable a, Typeable b) => (a :-> b) -> Reify Interface
startInfo :: Info
Documentation
class Program a whereSource
Types that represent core language programs
Methods
reify :: a -> GraphSource
Converts a program to a Graph
numArgs :: T a -> IntSource
Returns whether or not the program has an argument. This is needed because the Graph type always assumes the existence of an input. So for programs without input, the Graph representation will have a "dummy" input, which is indistinguishable from a real input.
show/hide Instances
Computable a => Program a
(Computable a, Computable b, Computable c, Computable d, Computable e) => Program (a -> b -> c -> d -> e)
(Computable a, Computable b, Computable c, Computable d) => Program (a -> b -> c -> d)
(Computable a, Computable b, Computable c) => Program (a -> b -> c)
(Computable a, Computable b) => Program (a -> b)
(Computable a, Computable b) => Program (a, b)
(Computable a, Computable b, Computable c) => Program (a, b, c)
(Computable a, Computable b, Computable c, Computable d) => Program (a, b, c, d)
showCore :: forall a. Program a => a -> StringSource
Shows the core code generated by the program.
showCoreWithSize :: forall a. Program a => a -> StringSource
Shows the core code with size information as comments.
printCore :: Program a => a -> IO ()Source
printCore = putStrLn . showCore
printCoreWithSize :: Program a => a -> IO ()Source
printCoreWithSize = putStrLn . showCoreWithSize
runGraph :: Reify a -> Info -> (a, ([Node], Info))Source
buildSubFun :: forall a b. (Typeable a, Typeable b) => (a :-> b) -> Reify InterfaceSource
startInfo :: InfoSource
Produced by Haddock version 2.6.1