Boil the milk, coconut milk, and 133g of sugar in a saucepan.
Whisk egg yolks and remaining sugar until pale and light.
Whisk boiling milk into egg yolks then return the mixture to the pan.
Cook over low heat until the custard coats the spatula.
Stir in the desiccated coconut and double cream.
Cool the mixture, stirring occasionally, then add the rum.
Sieve the mixture and churn in an ice-cream maker for 20 minutes.
Freeze the ice cream in a chilled container.
Boil and simmer syrup ingredients until reduced by three-quarters.
Preheat the oven to 180°C.
Trim and peel the pineapple into a cylinder shape.
Cut a 5mm deep spiral groove around the fruit to remove eyes.
Stud the pineapple evenly with cloves.
Brown the pineapple in hot oil using a large pan.
Place the pineapple upright in a roasting dish.
Baste with syrup and roast for 35 to 40 minutes, basting every 5 minutes.
Let the pineapple rest for 15 minutes while basting with syrup.
Slice the pineapple into 1cm rounds.
Serve pineapple slices with ice cream and star anise garnish.