sketch-frp-copilot-1.0.0: FRP sketch programming with Copilot
Safe HaskellNone
LanguageHaskell2010

Sketch.FRP.Copilot.Internals

Synopsis

Documentation

getUniqueId :: String -> GenSketch pinid UniqueId Source #

Gets a unique id.

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

Generates a unique name.

emptyFramework :: Ord pinid => GenFramework pinid Source #

Use to create an empty framework.

It helps to specify the type of pinid to use:

(emptyFramework @PinId) { ... }

defineTriggerAlias :: String -> GenFramework pinid -> GenSketch pinid (GenFramework pinid, 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 pinid t Source #

Constructors

InputSource 

Fields

evalSketch :: Ord pinid => GenSketch pinid a -> (Maybe Spec, GenFramework pinid) Source #

sketchSpec :: Ord pinid => GenSketch pinid a -> Spec Source #

Extracts a copilot Spec from a Sketch.

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