On 10/28/19 3:27 PM, Mark Clements wrote:
fun defaultSetting args =
      update {A=1, B=1} args

val _ = defaultSetting {A=2} (* {A=2, B=1} *)
val _ = defaultSetting {B=2} (* {A=1, B=2} *)
The problem is that polymorphism in Ur/Web is always declared explicitly, not inferred as OCaml or Haskell.  You must add binders for type variables for defaultSettings just as you did for update.  (This statement applies to definitions of functions, not uses, so the two example calls above should work once you get defaultSettings defined properly.)

_______________________________________________
Ur mailing list
Ur@impredicative.com
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to