diff options
-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 |