Heat the butter in a large frying pan until melted. Sprinkle half the sugar over the pineapple and cook for 3 minutes until caramelized. Turn the wedges over and cook for 2 minutes more. Remove the pineapple from the pan.
Take the frying pan off the heat and add the rum and remaining sugar. Return to the heat and simmer until thickened.
Meanwhile, place the coconut in a small, dry frying pan and cook for 1–2 minutes, stirring frequently, until lightly browned. Put the pineapple slices on serving plates with scoops of ice cream. Drizzle over the sauce and scatter over the coconut to serve.