start of conversion of type constructors to functions