feldspar-compiler-0.6.0.2: Compiler for the Feldspar language

Safe Haskell | None

Feldspar.Compiler.Backend.C.Options

Contents

- Actions and rules

Synopsis

- data Options = Options {
  - platform :: Platform
  - unroll :: UnrollStrategy
  - debug :: DebugOption
  - memoryInfoVisible :: Bool
  - rules :: [Rule]
  }
- data UnrollStrategy
  - = NoUnroll
  - | Unroll Int
- data DebugOption
  - = NoDebug
  - | NoPrimitiveInstructionHandling
- data Platform = Platform {
  - name :: String
  - types :: [(Type, String, String)]
  - values :: [(Type, ShowValue)]
  - includes :: [String]
  - platformRules :: [Rule]
  - isRestrict :: IsRestrict
  }
- type ShowValue = Constant () -> String
- data IsRestrict
  - = Restrict
  - | NoRestrict
- data Action t
  - = Replace t
  - | Propagate Rule
  - | WithId (Int -> [Action t])
  - | WithOptions (Options -> [Action t])
- data Rule where
  - Rule :: Typeable t => (t -> [Action t]) -> Rule
- rule :: (Interface t, Typeable (Repr t)) => (t -> [Action (Repr t)]) -> Rule
- replaceWith :: Interface t => t -> Action (Repr t)
- propagate :: (Interface t, Typeable (Repr t)) => (t -> [Action (Repr t)]) -> Action t'

# Documentation

data Options

Constructors

Options |
Fields platform :: Platform unroll :: UnrollStrategy debug :: DebugOption memoryInfoVisible :: Bool rules :: [Rule]

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)] includes :: [String] platformRules :: [Rule] isRestrict :: IsRestrict

Instances

Eq Platform |
Show Platform |

type ShowValue = Constant () -> String

data IsRestrict

Constructors

Restrict |
NoRestrict |

Instances

Eq IsRestrict |
Show IsRestrict |

# Actions and rules

data Action t

Constructors

Replace t |
Propagate Rule |
WithId (Int -> [Action t]) |
WithOptions (Options -> [Action t]) |

Instances

Typeable1 Action |

data Rule where

Constructors

Rule :: Typeable t => (t -> [Action t]) -> Rule |

Instances

Eq Rule |
Show Rule |
Combine [Rule] |

rule :: (Interface t, Typeable (Repr t)) => (t -> [Action (Repr t)]) -> Rule

replaceWith :: Interface t => t -> Action (Repr t)

propagate :: (Interface t, Typeable (Repr t)) => (t -> [Action (Repr t)]) -> Action t'