Add inference for function signatures