feldspar-compiler-0.6.0.2: Compiler for the Feldspar language

Safe Haskell | None

Feldspar.Transformation.Framework

# Documentation

transformationError :: String -> a

class Default t where

Methods

def :: t

Instances

Default Bool |
Default Bool |
Default Int |
Default () |
Default Collection |
Default SignatureInformation |
Default TypeCatalog |
Default [String] |
Default [a] |
Default [Declaration ()] |
Default (Maybe SemInfPrg) |
Default (Program DebugToCSemanticInfo) |
(Default a, Default b) => Default (a, b) |
(Default a, Default b, Default c) => Default (a, b, c) |

class Combine t where

Methods

combine :: t -> t -> t

Instances

Combine Bool |
Combine Bool |
Combine Int |
Combine String |
Combine () |
Combine Collection |
Combine [String] |
Combine [Declaration ()] |
Combine [Rule] |
Combine (Program DebugToCSemanticInfo) |
(Combine a, Combine b) => Combine (a, b) |

class Convert a b where

Methods

convert :: a -> b

Instances

Default b => Convert a b |

class (Default (Up t), Combine (Up t)) => Transformation t

Associated Types

type From t

type To t

type State t

type Down t

type Up t

Instances

Transformation Collect |
Transformation ConstantFolding |
Transformation Free |
Transformation IVarPlugin |
Transformation BlockProgramHandler |
Transformation VariableRoleAssigner |
Transformation Unroll2 |
Transformation Unroll1 |
Transformation UnrollPlugin |
Transformation RulePlugin |
Transformation Precompilation |
Transformation DebugToC |
Transformation GetPrgSeqLoop |
Transformation GetPrgProcCall |
Transformation GetPrgBranch |
Transformation GetPrgAssign |
Transformation GetPrgParLoop |
Transformation TypeCorrector |
Transformation TypeCheck |
Transformation GlobalCollector |
Transformation TypeDefinitionGenerator |

data Result t s

Constructors

Result |

Fields

result :: s (To t)
state :: State t
up :: Up t

Instances

(Transformation t, Show (s (To t)), Show (State t), Show (Up t)) => Show (Result t s) |

data Result1 t s a

Constructors

Result1 |

Fields

result1 :: s (a (To t))
state1 :: State t
up1 :: Up t

Instances

(Transformation t, Show (s (b (To t))), Show (State t), Show (Up t)) => Show (Result1 t s b) |

class Transformable t s where

Methods

transform :: t -> State t -> Down t -> s (From t) -> Result t s

Instances

DefaultTransformable t s => Transformable t s |
Transformable Collect Variable |
Transformable Collect Program |
Transformable Collect Block |
Transformable ConstantFolding Expression |
Transformable Free Block |
Transformable IVarPlugin Program |
Transformable IVarPlugin Block |
Transformable IVarPlugin Entity |
Transformable BlockProgramHandler Program |
Transformable BlockProgramHandler Block |
Transformable VariableRoleAssigner Variable |
Transformable VariableRoleAssigner Entity |
Transformable Unroll2 Variable |
Transformable Unroll2 Expression |
Transformable Unroll2 Program |
Transformable Unroll1 Program |
(DefaultTransformable RulePlugin t, Typeable1 t) => Transformable RulePlugin t |
Transformable Precompilation Variable |
Transformable Precompilation ActualParameter |
Transformable Precompilation Program |
Transformable Precompilation Entity |
Transformable DebugToC Variable |
Transformable DebugToC Constant |
Transformable DebugToC Expression |
Transformable DebugToC Declaration |
Transformable DebugToC ActualParameter |
Transformable DebugToC Program |
Transformable DebugToC Block |
Transformable DebugToC StructMember |
Transformable DebugToC Entity |
Transformable DebugToC Module |
Transformable GetPrgSeqLoop Program |
Transformable GetPrgProcCall Program |
Transformable GetPrgBranch Program |
Transformable GetPrgAssign Program |
Transformable GetPrgParLoop Program |
Transformable TypeCorrector Variable |
Transformable TypeCorrector Entity |
Transformable TypeCheck Variable |
Transformable TypeCheck Declaration |
Transformable TypeCheck Program |
Transformable TypeCheck Block |
Transformable TypeCheck Entity |
Transformable GlobalCollector Variable |
Transformable GlobalCollector Entity |
Transformable TypeDefinitionGenerator Variable |
Transformable TypeDefinitionGenerator Module |

class Transformable1 t s a where

Methods

transform1 :: t -> State t -> Down t -> s (a (From t)) -> Result1 t s a

Instances

DefaultTransformable1 t s a => Transformable1 t s a |
Transformable1 DebugToC [] Variable |
Transformable1 DebugToC [] Constant |
Transformable1 DebugToC [] Expression |
Transformable1 DebugToC [] Declaration |
Transformable1 DebugToC [] ActualParameter |
Transformable1 DebugToC [] Program |
Transformable1 DebugToC [] StructMember |
Transformable1 DebugToC [] Entity |

class DefaultTransformable t s where

Methods

defaultTransform :: t -> State t -> Down t -> s (From t) -> Result t s

Instances

(Conversion t Variable, Default (Up t)) => DefaultTransformable t Variable |
(Transformable t Constant, Transformable1 t [] Constant, Conversion t Constant, Conversion t IntConst, Conversion t FloatConst, Conversion t BoolConst, Conversion t ArrayConst, Conversion t ComplexConst, Default (Up t)) => DefaultTransformable t Constant |
(Transformable t Expression, Transformable t Variable, Transformable t Constant, Transformable1 t [] Expression, Conversion t Expression, Conversion t FunctionCall, Conversion t ArrayElem, Conversion t StructField, Conversion t SizeOf, Conversion t Cast, Default (Up t)) => DefaultTransformable t Expression |
(Transformable t Variable, Transformable1 t Maybe Expression, Conversion t Declaration) => DefaultTransformable t Declaration |
(Transformable t Expression, Conversion t ActualParameter) => DefaultTransformable t ActualParameter |

(Transformable1 t [] Program, Transformable t Expression, Transformable1 t [] ActualParameter, Transformable t Block, Transformable t Variable, Conversion t Program, Conversion t Empty, Conversion t Comment, Conversion t Assign, Conversion t ProcedureCall, Conversion t Spawn, Conversion t Run, Conversion t Sequence, Conversion t Branch, Conversion t SeqLoop, Conversion t ParLoop, Default (Up t)) => DefaultTransformable t Program

(Transformable1 t [] Declaration, Transformable t Program, Conversion t Block) => DefaultTransformable t Block |
(Conversion t StructMember, Default (Up t)) => DefaultTransformable t StructMember |
(Transformable1 t [] StructMember, Transformable1 t [] Variable, Transformable t Block, Transformable t Declaration, Conversion t Entity, Conversion t Struct, Conversion t ProcDef, Conversion t ProcDecl) => DefaultTransformable t Entity |
(Transformable1 t [] Entity, Conversion t Module) => DefaultTransformable t Module |

class DefaultTransformable1 t s a where

Methods

defaultTransform1 :: t -> State t -> Down t -> s (a (From t)) -> Result1 t s a

Instances

(Transformable t a, Default (Up t), Transformation t) => DefaultTransformable1 t Maybe a |
(Transformable t a, Default (Up t), Combine (Up t), Transformation t) => DefaultTransformable1 t [] a |