-- TASK

task :: String -> Expression () -> T.Port t -> Expression ()
task name expr portType =
  case portType of
    T.Normal _ ->
        _Task "perform" `call` [ expr ]

    T.Signal _ _ ->
        _Task "performSignal" `call` [ StringLit () name, expr ]



-- HELPERS
task :: String -> Expression () -> T.Port t -> Expression ()
task name expr portType =
  case portType of
    T.Normal _ ->
        _Task "perform" `call` [ expr ]

    T.Signal _ _ ->
        _Task "performSignal" `call` [ StringLit () name, expr ]



-- HELPERS
task name expr portType =
  case portType of
    T.Normal _ ->
        _Task "perform" `call` [ expr ]

    T.Signal _ _ ->
        _Task "performSignal" `call` [ StringLit () name, expr ]



-- HELPERS