packages feed

arduino-copilot 1.7.0 → 1.7.1

raw patch · 15 files changed

+98/−69 lines, 15 filesdep ~copilotdep ~copilot-c99dep ~copilot-languagePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: copilot, copilot-c99, copilot-language, sketch-frp-copilot

API changes (from Hackage documentation)

+ Copilot.Arduino.Library.Serial: byteArray :: KnownNat n => Stream (Array n Int8) -> FormatOutput
+ Copilot.Arduino.Library.Serial.Device: byteArray :: KnownNat n => Stream (Array n Int8) -> FormatOutput
+ Copilot.Arduino.Library.Serial.XBee: byteArray :: KnownNat n => Stream (Array n Int8) -> FormatOutput

Files

CHANGELOG view
@@ -1,3 +1,11 @@+arduino-copilot (1.7.1) upstream; urgency=medium++  * Added byteArray to serial modules, which allows outputting a+    Stream of Arrays of bytes.+  * Update to copilot-3.9.++ -- Joey Hess <id@joeyh.name>  Sun, 08 May 2022 15:10:49 -0400+ arduino-copilot (1.7.0) upstream; urgency=medium    * Added the Arduino data type, which replaces the PinId type used in the@@ -17,7 +25,7 @@  arduino-copilot (1.5.7) unstable; urgency=medium -  * Update to copilot-3.7.+  * Update to copilot-3.8.   -- Joey Hess <id@joeyh.name>  Wed, 02 Feb 2022 11:07:53 -0400 
Examples/Blink/stack.yaml view
@@ -3,13 +3,13 @@ - '../..' resolver: lts-18.9 extra-deps: -- sketch-frp-copilot-1.0.1-- copilot-3.7-- copilot-c99-3.7-- copilot-core-3.7-- copilot-language-3.7-- copilot-libraries-3.7-- copilot-theorem-3.7+- sketch-frp-copilot-1.0.2+- copilot-3.9+- copilot-c99-3.9+- copilot-core-3.9+- copilot-language-3.9+- copilot-libraries-3.9+- copilot-theorem-3.9 - ansi-terminal-0.9.1 - bimap-0.3.3 - language-c99-0.1.2
Examples/Button/stack.yaml view
@@ -3,13 +3,13 @@ - '../..' resolver: lts-18.9 extra-deps: -- sketch-frp-copilot-1.0.1-- copilot-3.7-- copilot-c99-3.7-- copilot-core-3.7-- copilot-language-3.7-- copilot-libraries-3.7-- copilot-theorem-3.7+- sketch-frp-copilot-1.0.2+- copilot-3.9+- copilot-c99-3.9+- copilot-core-3.9+- copilot-language-3.9+- copilot-libraries-3.9+- copilot-theorem-3.9 - ansi-terminal-0.9.1 - bimap-0.3.3 - language-c99-0.1.2
Examples/ButtonHold/stack.yaml view
@@ -3,13 +3,13 @@ - '../..' resolver: lts-18.9 extra-deps: -- sketch-frp-copilot-1.0.1-- copilot-3.7-- copilot-c99-3.7-- copilot-core-3.7-- copilot-language-3.7-- copilot-libraries-3.7-- copilot-theorem-3.7+- sketch-frp-copilot-1.0.2+- copilot-3.9+- copilot-c99-3.9+- copilot-core-3.9+- copilot-language-3.9+- copilot-libraries-3.9+- copilot-theorem-3.9 - ansi-terminal-0.9.1 - bimap-0.3.3 - language-c99-0.1.2
Examples/EEPROM/stack.yaml view
@@ -3,13 +3,13 @@ - '../..' resolver: lts-18.9 extra-deps: -- sketch-frp-copilot-1.0.1-- copilot-3.7-- copilot-c99-3.7-- copilot-core-3.7-- copilot-language-3.7-- copilot-libraries-3.7-- copilot-theorem-3.7+- sketch-frp-copilot-1.0.2+- copilot-3.9+- copilot-c99-3.9+- copilot-core-3.9+- copilot-language-3.9+- copilot-libraries-3.9+- copilot-theorem-3.9 - ansi-terminal-0.9.1 - bimap-0.3.3 - language-c99-0.1.2
Examples/EEPROMrange/stack.yaml view
@@ -3,13 +3,13 @@ - '../..' resolver: lts-18.9 extra-deps: -- sketch-frp-copilot-1.0.1-- copilot-3.7-- copilot-c99-3.7-- copilot-core-3.7-- copilot-language-3.7-- copilot-libraries-3.7-- copilot-theorem-3.7+- sketch-frp-copilot-1.0.2+- copilot-3.9+- copilot-c99-3.9+- copilot-core-3.9+- copilot-language-3.9+- copilot-libraries-3.9+- copilot-theorem-3.9 - ansi-terminal-0.9.1 - bimap-0.3.3 - language-c99-0.1.2
Examples/Random/stack.yaml view
@@ -3,13 +3,13 @@ - '../..' resolver: lts-18.9 extra-deps: -- sketch-frp-copilot-1.0.1-- copilot-3.7-- copilot-c99-3.7-- copilot-core-3.7-- copilot-language-3.7-- copilot-libraries-3.7-- copilot-theorem-3.7+- sketch-frp-copilot-1.0.2+- copilot-3.9+- copilot-c99-3.9+- copilot-core-3.9+- copilot-language-3.9+- copilot-libraries-3.9+- copilot-theorem-3.9 - ansi-terminal-0.9.1 - bimap-0.3.3 - language-c99-0.1.2
Examples/SerialPort/stack.yaml view
@@ -3,13 +3,13 @@ - '../..' resolver: lts-18.9 extra-deps: -- sketch-frp-copilot-1.0.1-- copilot-3.7-- copilot-c99-3.7-- copilot-core-3.7-- copilot-language-3.7-- copilot-libraries-3.7-- copilot-theorem-3.7+- sketch-frp-copilot-1.0.2+- copilot-3.9+- copilot-c99-3.9+- copilot-core-3.9+- copilot-language-3.9+- copilot-libraries-3.9+- copilot-theorem-3.9 - ansi-terminal-0.9.1 - bimap-0.3.3 - language-c99-0.1.2
Examples/WaterHeater/stack.yaml view
@@ -3,13 +3,13 @@ - '../..' resolver: lts-18.9 extra-deps: -- sketch-frp-copilot-1.0.1-- copilot-3.7-- copilot-c99-3.7-- copilot-core-3.7-- copilot-language-3.7-- copilot-libraries-3.7-- copilot-theorem-3.7+- sketch-frp-copilot-1.0.2+- copilot-3.9+- copilot-c99-3.9+- copilot-core-3.9+- copilot-language-3.9+- copilot-libraries-3.9+- copilot-theorem-3.9 - ansi-terminal-0.9.1 - bimap-0.3.3 - language-c99-0.1.2
TODO view
@@ -32,6 +32,16 @@   facilities for operating on Array are limited so it could be useful to   have a Range interface too. +* A single Sketch that has two writes to the same pin currently results+  in C code that indeed writes twice per loop. This is somewhat surprising,+  undocumented, and perhaps breaks the FRP-like behavior. It would be possible+  to prevent multiple writes to the same pin in a Sketch (already done for+  dissimilar uses of the same pin), but that is complicated by combining+  two Sketches with if/then/else or whenB or similar, that both write to+  the same pin, but not actually at the same time.+  	whenB foo (led =: false) >> whenB bar (led =: true)+  Which should be legal at least when foo /= bar.+ * The way serial output works is somewhat unsatisfying, because   it does not take a Stream FormatOutput. So the Copilot DSL can't be used   to adjust the output format as the arduino runs; it's fixed at compile
arduino-copilot.cabal view
@@ -1,5 +1,5 @@ Name: arduino-copilot-Version: 1.7.0+Version: 1.7.1 Cabal-Version: >= 1.10 License: BSD3 Maintainer: Joey Hess <id@joeyh.name>@@ -114,10 +114,10 @@     Copilot.Arduino.Main   Build-Depends:     base (>= 4.5 && < 5),-    sketch-frp-copilot (== 1.0.1),-    copilot (== 3.7.*),-    copilot-c99 (== 3.7.*),-    copilot-language (== 3.7.*),+    sketch-frp-copilot (== 1.0.2),+    copilot (== 3.9.*),+    copilot-c99 (== 3.9.*),+    copilot-language (== 3.9.*),     filepath,     directory,     mtl,
src/Copilot/Arduino/Library/Serial.hs view
@@ -14,6 +14,7 @@ 	show, 	showFormatted, 	byte,+	byteArray, 	noInput, 	SerialDevice, 	FormatOutput,
src/Copilot/Arduino/Library/Serial/Device.hs view
@@ -23,6 +23,7 @@ import Data.List import Data.Maybe import Data.Proxy+import GHC.TypeNats import qualified Prelude  -- | Eg \"Serial\" or \"Serial2\"@@ -181,6 +182,14 @@ byte :: Stream Int8 -> FormatOutput byte s = FormatOutput 	(Just (arg s))+	(Just (showCType (Proxy @Int8)))+	(\(SerialDeviceName devname) v ->+		CLine $ devname <> ".write(" <> v <> ");")++-- | Write an array of bytes to the serial port.+byteArray :: KnownNat n => Stream (Array n Int8) -> FormatOutput+byteArray arr = FormatOutput+	(Just (arg arr)) 	(Just (showCType (Proxy @Int8))) 	(\(SerialDeviceName devname) v -> 		CLine $ devname <> ".write(" <> v <> ");")
src/Copilot/Arduino/Library/Serial/XBee.hs view
@@ -15,6 +15,7 @@ 	show, 	showFormatted, 	byte,+	byteArray, 	noInput, 	SerialDevice, 	FormatOutput,
stack.yaml view
@@ -2,13 +2,13 @@ - '.' resolver: lts-18.9 extra-deps:-- sketch-frp-copilot-1.0.1-- copilot-3.7-- copilot-c99-3.7-- copilot-core-3.7-- copilot-language-3.7-- copilot-libraries-3.7-- copilot-theorem-3.7+- sketch-frp-copilot-1.0.2+- copilot-3.9+- copilot-c99-3.9+- copilot-core-3.9+- copilot-language-3.9+- copilot-libraries-3.9+- copilot-theorem-3.9 - ansi-terminal-0.9.1 - bimap-0.3.3 - language-c99-0.1.2