Preheat oven to 375°F.
In a large bowl, combine the flour and salt. Add the cold butter cubes and work them into the flour with a pastry blender or your fingers until a crumbly mixture forms.
Add the ice water, a tablespoon at a time, until a dough forms.
Shape the dough into a disc, wrap it in plastic wrap, and chill for at least 30 minutes.
On a floured surface, roll out the dough to fit a 9-inch pie plate. Place the dough in the plate, trim off any excess dough, and crimp the edges.
Line the crust with parchment paper and fill with pie weights or dried beans. Bake for 15 minutes, then remove the weights and paper and bake for another 10 minutes, until golden brown. Let the crust cool completely.
Prepare the chocolate layer: Heat ¾ cup coconut milk in a saucepan. In a separate bowl, whisk together the remaining ¼ cup coconut milk with the cornstarch and sugar until smooth. Add the chopped chocolate to the warm coconut milk and stir until melted. Add the cornstarch mixture and cook, stirring constantly, for 3-4 minutes, until it thickens. Pour the chocolate layer over the cooled crust and chill for an hour.
Prepare the haupia layer; Heat 1¼ cups coconut milk in a saucepan. In a separate bowl, whisk together the remaining ¼ cup coconut milk with cornstarch, sugar, and salt. Add the cornstarch mixture to the warm coconut milk and cook, stirring constantly, for 4-5 minutes, until a thick cream forms. Pour over the chocolate layer and chill for 3 hours.
Whip the heavy cream with powdered sugar until stiff peaks form. Pipe or spread evenly over the pie and sprinkle with chocolate shavings.
Serve the haupia pie chilled.