Commit f970b028 authored by Valentin Reis's avatar Valentin Reis

[fix] Move List to Optional List in dhall configuration for slice-actuators.

parent bcf740b2
Pipeline #12435 passed with stages
in 8 minutes and 11 seconds
......@@ -11,6 +11,6 @@ in { name = "default"
, app =
{ perfwrapper = None t.Perfwrapper
, instrumentation = None t.Instrumentation
, actuators = [] : List t.AppActuatorKV
, actuators = None (List t.AppActuatorKV)
}
}
......@@ -40,7 +40,7 @@ let App =
-- instrumentation: an optional libnrm instrumentation configuration
{ perfwrapper : Optional Perfwrapper
, instrumentation : Optional Instrumentation
, actuators : List AppActuatorKV
, actuators : Optional (List AppActuatorKV)
}
let Manifest =
......
......@@ -106,7 +106,7 @@ registerPID c pid = Cmd
downstreamThreads = M.empty,
pid = pid,
appActuators =
fromList . fmap (\(AppActuatorKV v k) -> (k, v)) $
fromList . fmap (\(AppActuatorKV v k) -> (k, v)) . fromMaybe [] $
c & manifest & app & Ma.actuators
}
......@@ -171,7 +171,7 @@ instance HasLensMap (CmdID, Cmd) ActiveSensorKey ActiveSensor where
instance HasLensMap (CmdID, Cmd) ActuatorKey Actuator where
lenses (_cmdID, cmd) =
(addPath (_2 . #appActuators) <$> lenses (appActuators cmd))
addPath (_2 . #appActuators) <$> lenses (appActuators cmd)
instance HasLensMap (Text, AppActuator) ActuatorKey Actuator where
lenses (t, _) =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment