Here is an example on sketch: https://sketch.sh/s/m8DJVHrcuVn8ujDxN2gBq7/
If you look at the last module (Logic
), you’ll see that the arguments to the function in the liftA2
call are annotated like ({foo}: Foo.t, {bar}: Bar.t) => Baz.{foo, bar}
. If I remove all (or even just one) of the annotations (({foo}, {bar}) => {foo, bar}
), the function throws compiler errors. If I change those types from records to string
s or int
s, this is no longer the case.
Is there a reason for this? Is there somewhere in some docs I can find more information about this? Is there something I should be looking out for that I may be doing incorrectly?