Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Sketch.FRP.Copilot.Internals
Synopsis
- getTriggerLimit :: TriggerLimit -> Behavior Bool
- addTriggerLimit :: TriggerLimit -> Behavior Bool -> Behavior Bool
- getUniqueId :: String -> GenSketch ctx UniqueId
- uniqueName :: String -> UniqueId -> String
- uniqueName' :: String -> UniqueId -> String
- emptyFramework :: Context ctx => GenFramework ctx
- mkCChunk :: [CLine] -> [CChunk]
- defineTriggerAlias :: String -> GenFramework ctx -> GenSketch ctx (GenFramework ctx, String)
- defineTriggerAlias' :: String -> String -> GenFramework ctx -> GenSketch ctx (GenFramework ctx, String)
- data MkInputSource ctx t = InputSource {
- defineVar :: [CChunk]
- setupInput :: [CChunk]
- inputPinmode :: Map ctx PinMode
- readInput :: [CChunk]
- inputStream :: Stream t
- mkInput :: MkInputSource ctx t -> GenSketch ctx (Behavior t)
- evalSketch :: Context ctx => GenSketch ctx a -> (Maybe Spec, GenFramework ctx)
- sketchSpec :: Context ctx => GenSketch ctx a -> Spec
Documentation
addTriggerLimit :: TriggerLimit -> Behavior Bool -> Behavior Bool Source #
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.
defineTriggerAlias' :: String -> String -> GenFramework ctx -> GenSketch ctx (GenFramework ctx, String) Source #
data MkInputSource ctx t Source #
Constructors
InputSource | |
Fields
|
evalSketch :: Context ctx => GenSketch ctx a -> (Maybe Spec, GenFramework ctx) Source #