feldspar-compiler-0.4.0.2: Compiler for the Feldspar language

Feldspar.Compiler.Backend.C.Options

# Documentation

data Options

Constructors

Options |
Fields platform :: Platform unroll :: UnrollStrategy debug :: DebugOption defaultArraySize :: Int

Instances

Eq Options |
Show Options |

data UnrollStrategy

Constructors

NoUnroll |
Unroll Int |

Instances

Eq UnrollStrategy |
Show UnrollStrategy |

data DebugOption

Constructors

NoDebug |
NoPrimitiveInstructionHandling |

Instances

Eq DebugOption |
Show DebugOption |

data Platform

Constructors

Platform |
Fields name :: String types :: [(Type, String, String)] values :: [(Type, ShowValue)] primitives :: [(FeldPrimDesc, Either CPrimDesc TransformPrim)] includes :: [String] isRestrict :: IsRestrict

Instances

Eq Platform |
Show Platform |

data FeldPrimDesc

Constructors

FeldPrimDesc |
Fields fName :: String inputs :: [TypeDesc]

Instances

Eq TransformPrim |
Eq FeldPrimDesc |
Show TransformPrim |
Show FeldPrimDesc |

data CPrimDesc

Constructors

Op1 |
Fields cOp :: String
Op2 |
Fields cOp :: String
Fun |
Fields cName :: String funPf :: FunPostfixDescr
Proc |
Fields cName :: String funPf :: FunPostfixDescr
Assig |
Cas |
InvalidDesc |

Instances

Eq CPrimDesc |
Show CPrimDesc |

data TypeDesc

Constructors

AllT |
BoolT |
RealT |
FloatT |
IntT |
IntTS |
IntTU |
IntTS_ Size |
IntTU_ Size |
IntT_ Size |
ComplexT TypeDesc |
UserT String |

Instances

Eq TypeDesc |
Show TypeDesc |

data FunPostfixDescr

Constructors

FunPostfixDescr |
Fields useInputs :: Int useOutputs :: Int

Instances

Eq FunPostfixDescr |
Show FunPostfixDescr |

type ShowValue = Constant () -> String

type TransformPrim = FeldPrimDesc -> [Expression ()] -> Type -> PrgDesc

data PrgDesc

Constructors

PrgDesc [Crt] [Line] Rgt |

Instances

Eq PrgDesc |
Eq TransformPrim |
Show PrgDesc |
Show TransformPrim |

data Crt

Constructors

Crt Type Var (Maybe Rgt) |

Instances

Eq Crt |
Show Crt |

data Line

Constructors

Asg Var Rgt |
Prc CPrimDesc [Rgt] [Var] |

Instances

Eq Line |
Show Line |

data Rgt

Constructors

Exp (Expression ()) |
Fnc CPrimDesc [Rgt] Type |
VarR Var |

Instances

Eq Rgt |
Show Rgt |

data Var

Constructors

Var String |

Instances

Eq Var |
Show Var |

data IsRestrict

Constructors

Restrict |
NoRestrict |

Instances

Eq IsRestrict |
Show IsRestrict |

machTypes :: TypeDesc -> Type -> Bool