In a saucepan, combine sugar, flour, and salt. Gradually whisk in milk and coconut milk until smooth.
Cook over medium heat, stirring constantly, until mixture thickens and boils. Boil for 1 minute, then remove from heat.
Gradually whisk a small amount of hot mixture into egg yolks, then return all to the pan, whisking constantly. Cook for 2 more minutes, then remove from heat.
Stir in shredded coconut and vanilla extract. Pour filling into pre-baked pie crust. Cool to room temperature, then refrigerate for at least 2 hours.
Top with whipped cream and sprinkle with additional shredded coconut, if desired. Serve chilled.