This statement in the update:
let update m msg =
match msg with
| SetEncounterMsg encounter ->
match encounter with
| None -> init() , Cmd.none
| Some s ->
init () |> (fun q -> {q with Encounter = Some s}),
Cmd.ofMsg (RequestPrescriptionsForEncounterMsg s)
runs/works correctly to request an asynchronous operation.
However, the "RequestPrescriptionsForEnconterMsg" is giving the warning that "This construct causes code to be less generic than indicated by the type annotations. The type vairable 'a has been constrained to be type 'Msg'
Why? This is of type Msg. How do I fix this? (I think I'm missing something here :( )
Any help is most appreciated.
Edit #1: The model, m, is initialized in the above with:
let init () : Model
= .....
which is then being further updated by the function, fun.