sketch-frp-copilot-1.0.3: Sketch programming with Copilot
Safe HaskellNone
LanguageHaskell2010

Sketch.FRP.Copilot.Internals

Synopsis

Documentation

getUniqueId :: String -> GenSketch ctx UniqueId Source #

Gets a unique id.

uniqueName :: String -> UniqueId -> String Source #

Generates a unique name.

emptyFramework :: Context ctx => GenFramework ctx Source #

Use to create an empty framework.

It helps to specify the type of context to use:

(emptyFramework @Arduino) { ... }

defineTriggerAlias :: String -> GenFramework ctx -> GenSketch ctx (GenFramework ctx, String) Source #

Copilot only supports calling a trigger with a given name once per Spec; the generated C code will fail to build if the same name is used in two triggers. This generates a unique alias that can be used in a trigger.

data MkInputSource ctx t Source #

Constructors

InputSource 

Fields

sketchSpec :: Context ctx => GenSketch ctx a -> Spec Source #

Extracts a copilot Spec from a Sketch.

This can be useful to intergrate with other libraries such as copilot-theorem.