diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2018-05-21 15:49:12 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2018-05-21 15:49:12 +0100 |
commit | e1353cb93b0dd3595de4ebd2553c2dc9b3ddc3cf (patch) | |
tree | 00b7c9e05662907e2a8701861dc676918fdac11d | |
parent | 5242cfe260b630c226e30693aa819adb11eacd50 (diff) | |
download | blog-e1353cb93b0dd3595de4ebd2553c2dc9b3ddc3cf.tar.bz2 |
Tweak formatting in runtime types post
-rw-r--r-- | posts/runtime-types.mdwn | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/posts/runtime-types.mdwn b/posts/runtime-types.mdwn index ddc5da9..cb5faeb 100644 --- a/posts/runtime-types.mdwn +++ b/posts/runtime-types.mdwn @@ -48,17 +48,15 @@ to build up a massively complex type system. Currently I am considering things (expressed for now in yaml) along the lines of: -[[!format yaml """ -- name: main_voltage - type: volts - expr: u16_be(raw_bmc, 14) / 10 -- name: main_current - type: amps - expr: i16_be(raw_bmc, 12) / 10 -- name: power_flow - type: watts - expr: main_voltage * main_current -"""]] + - name: main_voltage + type: volts + expr: u16_be(raw_bmc, 14) / 10 + - name: main_current + type: amps + expr: i16_be(raw_bmc, 12) / 10 + - name: power_flow + type: watts + expr: main_voltage * main_current What I'd like is for each expression to be type-checked. I'm happy for untyped scalars to end up auto-labelled (so the `u16_be()` function would return an |