In a saucepan, combine sugar, flour, and salt; gradually stir in milk. Cook and stir over medium heat until bubbly. Cook and stir 2 minutes. Remove from heat. Stir small amount of hot mixture into egg yolks. Immediately return egg yolk mixture to the pan, and cook for 2 minutes stirring constantly. Remove from heat. Add butter, vanilla, coconut, and before you remove the mixture from the stove, stir in the cream cheese, and mix well. Pour into a cooled baked pie shell.