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

Feldspar.Haskell

Description

Helper functions for producing Haskell code

Synopsis

Documentation

class HaskellType a whereSource

Types that can represent Haskell types (as source code strings)

Methods

haskellType :: a -> StringSource

Gives the Haskell type denoted by the argument.

class HaskellValue a whereSource

Types that can represent Haskell values (as source code strings)

Methods

haskellValue :: a -> StringSource

Gives the Haskell code denoted by the argument.

unlinesNoTrail :: [String] -> StringSource

Like unlines, but no trailing '\n'.

indent :: Int -> String -> StringSource

Indents a string the given number of columns.

(-$-) :: HaskellValue a => String -> a -> StringSource

Application

opApp :: (HaskellValue a, HaskellValue b) => String -> a -> b -> StringSource

Binary operator application

(-=-) :: (HaskellValue patt, HaskellValue def) => patt -> def -> StringSource

Definition