I'm trying to implement a generic procedure that uses merge
with an abstract type, but it always fail with ❰merge❱ expects a record of handlers
, even when the caller pass a record type:
let Keys
: Type
= < A | B >
let ConfigType
: Type
= { A : Text, B : Text }
let Renderer =
λ(configType : Type)
→ λ(config : configType)
→ λ(value : Keys)
→ merge config value
in Renderer ConfigType { A = "A", B = "B" } Keys.A
Is it possible to indicate that configType will be a record type so that this generic method can be interpreted?