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.Base

Description

 

Synopsis

Documentation

type Ion = State IonDef Source

This wraps Ion with the ability to create unique C identifier names.

data IonDef Source

Constructors

IonDef 

Fields

ionId :: String

Unique ID (used as base name)

ionNum :: Int

Next unused number

ionDefs :: ModuleDef

Ivory definitions that the specifications produce

ionCtxt :: Schedule

The inherited context

ionSched :: [Schedule]

A flat list of schedule items generated along the way.

data Schedule Source

A scheduled action. Phase and period here are absolute, and there are no child nodes.

Constructors

Schedule 

Fields

schedId :: Integer

A unique ID for this action

schedName :: String

Name (without any disambiguation applied)

schedPath :: [String]

A list of names giving the trail that produced this schedule

schedPhase :: Integer

The (absolute & exact) phase of this action

schedPeriod :: Integer

The period of this action

schedAction :: [IvoryAction ()]

The Ivory effects for this action

schedCond :: [IvoryAction IBool]

Ivory effects which all must return true for anything in schedAction to execute

Instances

type IvoryAction = Ivory NoEffects Source

The type of Ivory action that an IonNode can support. Note that this purposely forbids breaking, returning, and allocating.

data PhaseContext Source

Constructors

Absolute

Phase is relative to the first tick within a period

Relative

Phase is relative to the last phase used

data PhaseType Source

Constructors

Min

Minimum phase (i.e. at this phase, or any later point)

Exact

Exactly this phase

Instances

data IonException Source

Constructors

InvalidCName [String] String Int

Path, C name, and index at which it is invalid

PhaseExceedsPeriod [String] Integer Integer

Path, phase, period

PhaseIsNegative [String] Integer

Path, phase

PeriodMustBePositive [String] Integer

Path, period