type directive factory with Function type

- the existing type fails with the stricter 0.9.5 compiler