Value restriction. The value '{0}' has been inferred to have generic type {1} Either define '{2}' as a simple data term, ...