While your baked sweet potato layer is cooling, make the haupia.
Mix sugar, cornstarch, and water in a separate bowl to make a slurry.
Pour can of coconut milk in a pot and heat on stovetop.
When the coconut milk is just starting to bubble, pour in your cornstarch slurry very slowly while continuously whisking the hot coconut milk in the pot. It's important to keep stirring to avoid lumps.
Cook the haupia, continuously whisking, until the mixture has thickened to a pudding like consistency. Do not let the mixture boil, but a few bubbles are okay.
Take the haupia off the heat. Then, very gently spread over the purple sweet potato filling.
Place the pie into the fridge to let the haupia layer set. I like to leave it uncovered in the fridge until the top has become dry to the touch, then I cover with plastic wrap.
When the pie has fully cooled and the haupia is set, you can cut it into squares to serve.