_ = pure f
) >>= \newF->
fresh >>= \tv->case expected of
- FuncType t = pure (s1, t, (FunExpr p newF args fs))
- //TODO: Fieldselectors!
+ FuncType t = foldM foldFieldSelectors t fs >>= \returnType ->
+ pure (s1, returnType, (FunExpr p newF args fs))
_ = (let given = foldr (->>) tv argTs in
lift (unify expected given) >>= \s2->
applySubst s2 >>|