ion-1.0.0.0: EDSL for concurrent, realtime, embedded programming on top of Ivory

Copyright(c) 2015 Chris Hodapp
Safe HaskellNone
LanguageHaskell2010

Ivory.Language.Ion.Code

Description

This contains functionality for converting the Ion type to Ivory constructs.

Known issues:

  • One must depend on the Ivory module that makes use of the definitions from ionDef in order to reference a variable declared with area'.
  • It can be really inefficient to require a separate counter for every distinct phase within a period. Why not reuse variables here when it's within the same period, and rather than starting at the phase, counting down, and checking for zero, instead starting just one variable at 0, counting up, checking for each individual phase?

Synopsis

Documentation

data IonExports a Source

Concrete exports from an Ion

Constructors

IonExports 

Fields

ionEntry :: Def (`[]` :-> ())
 
ionModule :: ModuleDef
 
ionValue :: a
 

ionCompile Source

Arguments

:: Opts

Options for runCompiler

-> String

Name for schedule function and module

-> Ion a

Spec

-> IO a 

Helper function to generate code from an Ion and run the Ivory compiler on it (or else output an exception message). While I don't yet know any reason why it needs to, this also returns whatever value the Ion returns.

ionDef Source

Arguments

:: String

Name for schedule function

-> Ion a

Ion specification

-> IonExports a 

Produce exports from the given Ion specs.

getIvory :: (eff ~ NoEffects) => Schedule -> Ivory eff () Source

Produce an Ivory effect from a Schedule.