arduino-copilot-1.7.9: Arduino programming in haskell using the Copilot stream DSL
Safe HaskellNone
LanguageHaskell2010

Copilot.Arduino.Internals

Description

You should not need to import this module unless you're adding support for a new model of Arduino, or an Arduino library.

Synopsis

Documentation

type Sketch = GenSketch Arduino Source #

An Arduino sketch, implemented using Copilot.

It's best to think of the Sketch as a description of the state of the board at any point in time.

Under the hood, the Sketch is run in a loop. On each iteration, it first reads inputs and then updates outputs as needed.

While it is a monad, a Sketch's outputs are not updated in any particular order, because Copilot does not guarantee any order.

newtype Pin (t :: k) Source #

A pin on the Arduino board.

For definitions of pins like pin12, load a module such as Copilot.Arduino.Uno, which provides the pins of a particular board.

A type-level list indicates how a Pin can be used, so the haskell compiler will detect impossible uses of pins.

Constructors

Pin Arduino 

Instances

Instances details
IsAnalogInputPin t => Input Arduino (Pin t) ADC Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

input' :: Pin t -> [ADC] -> GenSketch Arduino (Behavior ADC) #

IsDigitalIOPin t => Input Arduino (Pin t) Bool Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

input' :: Pin t -> [Bool] -> GenSketch Arduino (Behavior Bool) #

IsPWMPin t => Output Arduino (Pin t) (Event 'PWM (Stream Word8)) Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

(=:) :: Pin t -> Event 'PWM (Stream Word8) -> GenSketch Arduino () #

IsDigitalIOPin t => Output Arduino (Pin t) (Event () (Stream Bool)) Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

(=:) :: Pin t -> Event () (Stream Bool) -> GenSketch Arduino () #

Show (Pin t) Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

showsPrec :: Int -> Pin t -> ShowS #

show :: Pin t -> String #

showList :: [Pin t] -> ShowS #

Eq (Pin t) Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

(==) :: Pin t -> Pin t -> Bool

(/=) :: Pin t -> Pin t -> Bool

Ord (Pin t) Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

compare :: Pin t -> Pin t -> Ordering #

(<) :: Pin t -> Pin t -> Bool

(<=) :: Pin t -> Pin t -> Bool

(>) :: Pin t -> Pin t -> Bool

(>=) :: Pin t -> Pin t -> Bool

max :: Pin t -> Pin t -> Pin t

min :: Pin t -> Pin t -> Pin t

newtype Arduino Source #

Indicates that you're programming an arduino, and not some other kind of hardware. The similar library zephyr-copilot allows programming other embedded boards in a very similar style to this one.

Constructors

Arduino Int16 

Instances

Instances details
Show Arduino Source # 
Instance details

Defined in Copilot.Arduino.Internals

Eq Arduino Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

(==) :: Arduino -> Arduino -> Bool

(/=) :: Arduino -> Arduino -> Bool

Ord Arduino Source # 
Instance details

Defined in Copilot.Arduino.Internals

Context Arduino Source # 
Instance details

Defined in Copilot.Arduino.Internals

Input Arduino ClockMicros Word32 Source # 
Instance details

Defined in Copilot.Arduino

Input Arduino ClockMillis Word32 Source # 
Instance details

Defined in Copilot.Arduino

Input Arduino RandomInput Word32 Source # 
Instance details

Defined in Copilot.Arduino.Library.Random

Input Arduino SerialDevice Int8 Source # 
Instance details

Defined in Copilot.Arduino.Library.Serial.Device

Output Arduino Delay MicroSeconds Source # 
Instance details

Defined in Copilot.Arduino.Internals

Output Arduino Delay MilliSeconds Source # 
Instance details

Defined in Copilot.Arduino.Internals

Output Arduino SerialDevice [FormatOutput] Source # 
Instance details

Defined in Copilot.Arduino.Library.Serial.Device

Output Arduino RandomSeed (Event () (Stream ADC)) Source # 
Instance details

Defined in Copilot.Arduino.Library.Random

Methods

(=:) :: RandomSeed -> Event () (Stream ADC) -> GenSketch Arduino () #

Output Arduino RandomSeed (Event () (Stream Word8)) Source # 
Instance details

Defined in Copilot.Arduino.Library.Random

Output Arduino SerialDevice (Event () [FormatOutput]) Source # 
Instance details

Defined in Copilot.Arduino.Library.Serial.Device

(ShowCType t, EEPROMable t) => Input Arduino (RangeReads t) t Source # 
Instance details

Defined in Copilot.Arduino.Library.EEPROMex

Methods

input' :: RangeReads t -> [t] -> GenSketch Arduino (Behavior t) #

EEPROMable t => Output Arduino (Range t) (RangeWrites t) Source # 
Instance details

Defined in Copilot.Arduino.Library.EEPROMex

Methods

(=:) :: Range t -> RangeWrites t -> GenSketch Arduino () #

EEPROMable t => Output Arduino (Location t) (Event () (Stream t)) Source # 
Instance details

Defined in Copilot.Arduino.Library.EEPROMex

Methods

(=:) :: Location t -> Event () (Stream t) -> GenSketch Arduino () #

EEPROMable t => Output Arduino (Range t) (Event () (RangeWrites t)) Source # 
Instance details

Defined in Copilot.Arduino.Library.EEPROMex

Methods

(=:) :: Range t -> Event () (RangeWrites t) -> GenSketch Arduino () #

IsAnalogInputPin t => Input Arduino (Pin t) ADC Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

input' :: Pin t -> [ADC] -> GenSketch Arduino (Behavior ADC) #

IsDigitalIOPin t => Input Arduino (Pin t) Bool Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

input' :: Pin t -> [Bool] -> GenSketch Arduino (Behavior Bool) #

IsPWMPin t => Output Arduino (Pin t) (Event 'PWM (Stream Word8)) Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

(=:) :: Pin t -> Event 'PWM (Stream Word8) -> GenSketch Arduino () #

IsDigitalIOPin t => Output Arduino (Pin t) (Event () (Stream Bool)) Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

(=:) :: Pin t -> Event () (Stream Bool) -> GenSketch Arduino () #

type ADC = Int16 Source #

Value read from an Arduino's ADC. Ranges from 0-1023.

type Framework = GenFramework Arduino Source #

The framework of a sketch.

class ShowCType (t :: k) where Source #

Methods

showCType :: Proxy t -> String Source #

Instances

Instances details
ShowCType Int16 Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

showCType :: Proxy Int16 -> String Source #

ShowCType Int32 Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

showCType :: Proxy Int32 -> String Source #

ShowCType Int64 Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

showCType :: Proxy Int64 -> String Source #

ShowCType Int8 Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

showCType :: Proxy Int8 -> String Source #

ShowCType Word16 Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

showCType :: Proxy Word16 -> String Source #

ShowCType Word32 Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

showCType :: Proxy Word32 -> String Source #

ShowCType Word64 Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

showCType :: Proxy Word64 -> String Source #

ShowCType Word8 Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

showCType :: Proxy Word8 -> String Source #

ShowCType Bool Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

showCType :: Proxy Bool -> String Source #

ShowCType Double Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

showCType :: Proxy Double -> String Source #

ShowCType Float Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

showCType :: Proxy Float -> String Source #

type Behavior t = Stream t #

data TypedBehavior (p :: k) t #

Constructors

TypedBehavior (Behavior t) 

Instances

Instances details
Output ctx o (Event p (Stream v)) => Output ctx o (TypedBehavior p v) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

(=:) :: o -> TypedBehavior p v -> GenSketch ctx () #

Typed a => IfThenElse (TypedBehavior p) a 
Instance details

Defined in Sketch.FRP.Copilot

IsBehavior (TypedBehavior p v) 
Instance details

Defined in Sketch.FRP.Copilot.Types

type BehaviorToEvent (TypedBehavior p v) 
Instance details

Defined in Sketch.FRP.Copilot.Types

data Event (p :: k) v #

Constructors

Event v (Stream Bool) 

Instances

Instances details
Output Arduino RandomSeed (Event () (Stream ADC)) Source # 
Instance details

Defined in Copilot.Arduino.Library.Random

Methods

(=:) :: RandomSeed -> Event () (Stream ADC) -> GenSketch Arduino () #

Output Arduino RandomSeed (Event () (Stream Word8)) Source # 
Instance details

Defined in Copilot.Arduino.Library.Random

Output Arduino SerialDevice (Event () [FormatOutput]) Source # 
Instance details

Defined in Copilot.Arduino.Library.Serial.Device

EEPROMable t => Output Arduino (Location t) (Event () (Stream t)) Source # 
Instance details

Defined in Copilot.Arduino.Library.EEPROMex

Methods

(=:) :: Location t -> Event () (Stream t) -> GenSketch Arduino () #

EEPROMable t => Output Arduino (Range t) (Event () (RangeWrites t)) Source # 
Instance details

Defined in Copilot.Arduino.Library.EEPROMex

Methods

(=:) :: Range t -> Event () (RangeWrites t) -> GenSketch Arduino () #

IsPWMPin t => Output Arduino (Pin t) (Event 'PWM (Stream Word8)) Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

(=:) :: Pin t -> Event 'PWM (Stream Word8) -> GenSketch Arduino () #

IsDigitalIOPin t => Output Arduino (Pin t) (Event () (Stream Bool)) Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

(=:) :: Pin t -> Event () (Stream Bool) -> GenSketch Arduino () #

class IsBehavior behavior where #

Methods

(@:) :: behavior -> Behavior Bool -> BehaviorToEvent behavior #

Instances

Instances details
EEPROMable t => IsBehavior (RangeWrites t) Source # 
Instance details

Defined in Copilot.Arduino.Library.EEPROMex

IsBehavior (Behavior v) 
Instance details

Defined in Sketch.FRP.Copilot.Types

IsBehavior [FormatOutput] Source # 
Instance details

Defined in Copilot.Arduino.Library.Serial.Device

IsBehavior (TypedBehavior p v) 
Instance details

Defined in Sketch.FRP.Copilot.Types

class Input ctx o t where #

Methods

input' :: o -> [t] -> GenSketch ctx (Behavior t) #

input :: Input ctx o t => o -> GenSketch ctx (Behavior t) #

class Output ctx o t where #

Methods

(=:) :: o -> t -> GenSketch ctx () #

Instances

Instances details
Output Arduino Delay MicroSeconds Source # 
Instance details

Defined in Copilot.Arduino.Internals

Output Arduino Delay MilliSeconds Source # 
Instance details

Defined in Copilot.Arduino.Internals

Output Arduino SerialDevice [FormatOutput] Source # 
Instance details

Defined in Copilot.Arduino.Library.Serial.Device

Output ctx o (Event () (Stream v)) => Output ctx o (Behavior v) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

(=:) :: o -> Behavior v -> GenSketch ctx () #

Output Arduino RandomSeed (Event () (Stream ADC)) Source # 
Instance details

Defined in Copilot.Arduino.Library.Random

Methods

(=:) :: RandomSeed -> Event () (Stream ADC) -> GenSketch Arduino () #

Output Arduino RandomSeed (Event () (Stream Word8)) Source # 
Instance details

Defined in Copilot.Arduino.Library.Random

Output Arduino SerialDevice (Event () [FormatOutput]) Source # 
Instance details

Defined in Copilot.Arduino.Library.Serial.Device

Output ctx o (Event p (Stream v)) => Output ctx o (TypedBehavior p v) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

(=:) :: o -> TypedBehavior p v -> GenSketch ctx () #

EEPROMable t => Output Arduino (Range t) (RangeWrites t) Source # 
Instance details

Defined in Copilot.Arduino.Library.EEPROMex

Methods

(=:) :: Range t -> RangeWrites t -> GenSketch Arduino () #

EEPROMable t => Output Arduino (Location t) (Event () (Stream t)) Source # 
Instance details

Defined in Copilot.Arduino.Library.EEPROMex

Methods

(=:) :: Location t -> Event () (Stream t) -> GenSketch Arduino () #

EEPROMable t => Output Arduino (Range t) (Event () (RangeWrites t)) Source # 
Instance details

Defined in Copilot.Arduino.Library.EEPROMex

Methods

(=:) :: Range t -> Event () (RangeWrites t) -> GenSketch Arduino () #

IsPWMPin t => Output Arduino (Pin t) (Event 'PWM (Stream Word8)) Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

(=:) :: Pin t -> Event 'PWM (Stream Word8) -> GenSketch Arduino () #

IsDigitalIOPin t => Output Arduino (Pin t) (Event () (Stream Bool)) Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

(=:) :: Pin t -> Event () (Stream Bool) -> GenSketch Arduino () #

data MilliSeconds #

Constructors

MilliSeconds (Stream Word32) 

Instances

Instances details
Output Arduino Delay MilliSeconds Source # 
Instance details

Defined in Copilot.Arduino.Internals

data MicroSeconds #

Constructors

MicroSeconds (Stream Word32) 

Instances

Instances details
Output Arduino Delay MicroSeconds Source # 
Instance details

Defined in Copilot.Arduino.Internals

type family IsDigitalIOPin (t :: [PinCapabilities]) where ... #

Equations

IsDigitalIOPin t = 'True ~ If (HasPinCapability 'DigitalIO t) 'True (TypeError ('Text "This Pin does not support digital IO") :: Bool) 

type family IsAnalogInputPin (t :: [PinCapabilities]) where ... #

Equations

IsAnalogInputPin t = 'True ~ If (HasPinCapability 'AnalogInput t) 'True (TypeError ('Text "This Pin does not support analog input") :: Bool) 

type family IsPWMPin (t :: [PinCapabilities]) where ... #

Equations

IsPWMPin t = 'True ~ If (HasPinCapability 'PWM t) 'True (TypeError ('Text "This Pin does not support PWM") :: Bool) 

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

liftB :: (Behavior a -> Behavior r) -> TypedBehavior t a -> Behavior r #

whenB :: Context ctx => Behavior Bool -> GenSketch ctx t -> GenSketch ctx t #

scheduleB :: (Typed t, Eq t, Context ctx) => Behavior t -> [(t, GenSketch ctx ())] -> GenSketch ctx () #

class IfThenElse (t :: Type -> Type) a where #

Methods

ifThenElse :: Behavior Bool -> t a -> t a -> t a #

Instances

Instances details
Typed a => IfThenElse Stream a 
Instance details

Defined in Sketch.FRP.Copilot

Methods

ifThenElse :: Behavior Bool -> Stream a -> Stream a -> Stream a #

Context ctx => IfThenElse (GenSketch ctx) () 
Instance details

Defined in Sketch.FRP.Copilot

Methods

ifThenElse :: Behavior Bool -> GenSketch ctx () -> GenSketch ctx () -> GenSketch ctx () #

(Context ctx, Typed a) => IfThenElse (GenSketch ctx) (Behavior a) 
Instance details

Defined in Sketch.FRP.Copilot

Methods

ifThenElse :: Behavior Bool -> GenSketch ctx (Behavior a) -> GenSketch ctx (Behavior a) -> GenSketch ctx (Behavior a) #

Typed a => IfThenElse (TypedBehavior p) a 
Instance details

Defined in Sketch.FRP.Copilot

newtype GenSketch ctx t #

Constructors

GenSketch (WriterT [(TriggerLimit -> Spec, TriggerLimit -> GenFramework ctx)] (State UniqueIds) t) 

Instances

Instances details
MonadState UniqueIds (GenSketch ctx) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

get :: GenSketch ctx UniqueIds

put :: UniqueIds -> GenSketch ctx ()

state :: (UniqueIds -> (a, UniqueIds)) -> GenSketch ctx a

Applicative (GenSketch ctx) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

pure :: a -> GenSketch ctx a #

(<*>) :: GenSketch ctx (a -> b) -> GenSketch ctx a -> GenSketch ctx b #

liftA2 :: (a -> b -> c) -> GenSketch ctx a -> GenSketch ctx b -> GenSketch ctx c #

(*>) :: GenSketch ctx a -> GenSketch ctx b -> GenSketch ctx b #

(<*) :: GenSketch ctx a -> GenSketch ctx b -> GenSketch ctx a #

Functor (GenSketch ctx) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

fmap :: (a -> b) -> GenSketch ctx a -> GenSketch ctx b #

(<$) :: a -> GenSketch ctx b -> GenSketch ctx a #

Monad (GenSketch ctx) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

(>>=) :: GenSketch ctx a -> (a -> GenSketch ctx b) -> GenSketch ctx b #

(>>) :: GenSketch ctx a -> GenSketch ctx b -> GenSketch ctx b #

return :: a -> GenSketch ctx a #

Context ctx => IfThenElse (GenSketch ctx) () 
Instance details

Defined in Sketch.FRP.Copilot

Methods

ifThenElse :: Behavior Bool -> GenSketch ctx () -> GenSketch ctx () -> GenSketch ctx () #

MonadWriter [(TriggerLimit -> Spec, TriggerLimit -> GenFramework ctx)] (GenSketch ctx) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

writer :: (a, [(TriggerLimit -> Spec, TriggerLimit -> GenFramework ctx)]) -> GenSketch ctx a

tell :: [(TriggerLimit -> Spec, TriggerLimit -> GenFramework ctx)] -> GenSketch ctx ()

listen :: GenSketch ctx a -> GenSketch ctx (a, [(TriggerLimit -> Spec, TriggerLimit -> GenFramework ctx)])

pass :: GenSketch ctx (a, [(TriggerLimit -> Spec, TriggerLimit -> GenFramework ctx)] -> [(TriggerLimit -> Spec, TriggerLimit -> GenFramework ctx)]) -> GenSketch ctx a

(Context ctx, Typed a) => IfThenElse (GenSketch ctx) (Behavior a) 
Instance details

Defined in Sketch.FRP.Copilot

Methods

ifThenElse :: Behavior Bool -> GenSketch ctx (Behavior a) -> GenSketch ctx (Behavior a) -> GenSketch ctx (Behavior a) #

Monoid (GenSketch ctx ()) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

mempty :: GenSketch ctx () #

mappend :: GenSketch ctx () -> GenSketch ctx () -> GenSketch ctx () #

mconcat :: [GenSketch ctx ()] -> GenSketch ctx () #

Semigroup (GenSketch ctx t) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

(<>) :: GenSketch ctx t -> GenSketch ctx t -> GenSketch ctx t #

sconcat :: NonEmpty (GenSketch ctx t) -> GenSketch ctx t

stimes :: Integral b => b -> GenSketch ctx t -> GenSketch ctx t

data GenFramework ctx #

Constructors

Framework 

Fields

Instances

Instances details
Context ctx => Monoid (GenFramework ctx) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Context ctx => Semigroup (GenFramework ctx) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

(<>) :: GenFramework ctx -> GenFramework ctx -> GenFramework ctx #

sconcat :: NonEmpty (GenFramework ctx) -> GenFramework ctx

stimes :: Integral b => b -> GenFramework ctx -> GenFramework ctx

MonadWriter [(TriggerLimit -> Spec, TriggerLimit -> GenFramework ctx)] (GenSketch ctx) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

writer :: (a, [(TriggerLimit -> Spec, TriggerLimit -> GenFramework ctx)]) -> GenSketch ctx a

tell :: [(TriggerLimit -> Spec, TriggerLimit -> GenFramework ctx)] -> GenSketch ctx ()

listen :: GenSketch ctx a -> GenSketch ctx (a, [(TriggerLimit -> Spec, TriggerLimit -> GenFramework ctx)])

pass :: GenSketch ctx (a, [(TriggerLimit -> Spec, TriggerLimit -> GenFramework ctx)] -> [(TriggerLimit -> Spec, TriggerLimit -> GenFramework ctx)]) -> GenSketch ctx a

class Ord ctx => Context ctx #

Instances

Instances details
Context Arduino Source # 
Instance details

Defined in Copilot.Arduino.Internals

data PinMode #

Instances

Instances details
Show PinMode 
Instance details

Defined in Sketch.FRP.Copilot.Types

Eq PinMode 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

(==) :: PinMode -> PinMode -> Bool

(/=) :: PinMode -> PinMode -> Bool

Ord PinMode 
Instance details

Defined in Sketch.FRP.Copilot.Types

data PinCapabilities #

Constructors

DigitalIO 
AnalogInput 
PWM 

Instances

Instances details
Show PinCapabilities 
Instance details

Defined in Sketch.FRP.Copilot.Types

Eq PinCapabilities 
Instance details

Defined in Sketch.FRP.Copilot.Types

Ord PinCapabilities 
Instance details

Defined in Sketch.FRP.Copilot.Types

IsAnalogInputPin t => Input Arduino (Pin t) ADC Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

input' :: Pin t -> [ADC] -> GenSketch Arduino (Behavior ADC) #

IsDigitalIOPin t => Input Arduino (Pin t) Bool Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

input' :: Pin t -> [Bool] -> GenSketch Arduino (Behavior Bool) #

IsPWMPin t => Output Arduino (Pin t) (Event 'PWM (Stream Word8)) Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

(=:) :: Pin t -> Event 'PWM (Stream Word8) -> GenSketch Arduino () #

IsDigitalIOPin t => Output Arduino (Pin t) (Event () (Stream Bool)) Source # 
Instance details

Defined in Copilot.Arduino.Internals

Methods

(=:) :: Pin t -> Event () (Stream Bool) -> GenSketch Arduino () #

data MkInputSource ctx t #

Constructors

InputSource 

newtype CLine #

Constructors

CLine 

Fields

Instances

Instances details
Show CLine 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

showsPrec :: Int -> CLine -> ShowS #

show :: CLine -> String #

showList :: [CLine] -> ShowS #

Eq CLine 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

(==) :: CLine -> CLine -> Bool

(/=) :: CLine -> CLine -> Bool

Ord CLine 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

compare :: CLine -> CLine -> Ordering #

(<) :: CLine -> CLine -> Bool

(<=) :: CLine -> CLine -> Bool

(>) :: CLine -> CLine -> Bool

(>=) :: CLine -> CLine -> Bool

max :: CLine -> CLine -> CLine

min :: CLine -> CLine -> CLine

data Delay #

Constructors

Delay 

Instances

Instances details
Output Arduino Delay MicroSeconds Source # 
Instance details

Defined in Copilot.Arduino.Internals

Output Arduino Delay MilliSeconds Source # 
Instance details

Defined in Copilot.Arduino.Internals

newtype UniqueIds #

Constructors

UniqueIds (Map String Integer) 

Instances

Instances details
MonadState UniqueIds (GenSketch ctx) 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

get :: GenSketch ctx UniqueIds

put :: UniqueIds -> GenSketch ctx ()

state :: (UniqueIds -> (a, UniqueIds)) -> GenSketch ctx a

newtype CChunk #

Constructors

CChunk [CLine] 

Instances

Instances details
Monoid CChunk 
Instance details

Defined in Sketch.FRP.Copilot.Types

Semigroup CChunk 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

(<>) :: CChunk -> CChunk -> CChunk #

sconcat :: NonEmpty CChunk -> CChunk

stimes :: Integral b => b -> CChunk -> CChunk

Show CChunk 
Instance details

Defined in Sketch.FRP.Copilot.Types

Eq CChunk 
Instance details

Defined in Sketch.FRP.Copilot.Types

Methods

(==) :: CChunk -> CChunk -> Bool

(/=) :: CChunk -> CChunk -> Bool

Ord CChunk 
Instance details

Defined in Sketch.FRP.Copilot.Types

type family BehaviorToEvent a #

Instances

Instances details
type BehaviorToEvent (RangeWrites t) Source # 
Instance details

Defined in Copilot.Arduino.Library.EEPROMex

type BehaviorToEvent (Behavior v) 
Instance details

Defined in Sketch.FRP.Copilot.Types

type BehaviorToEvent [FormatOutput] Source # 
Instance details

Defined in Copilot.Arduino.Library.Serial.Device

type BehaviorToEvent (TypedBehavior p v) 
Instance details

Defined in Sketch.FRP.Copilot.Types

type family HasPinCapability (c :: t) (list :: [t]) :: Bool where ... #

Equations

HasPinCapability (c :: t) ('[] :: [t]) = 'False 
HasPinCapability (c :: PinCapabilities) (x ': xs :: [PinCapabilities]) = SameCapability c x || HasPinCapability c xs 

newtype UniqueId #

Constructors

UniqueId Integer 

evalSketch :: Context ctx => GenSketch ctx a -> (Maybe Spec, GenFramework ctx) #