Toast the pecans in a dry skillet over medium heat for 4 to 5 minutes, stirring often, until fragrant. Let cool, then roughly chop and set aside.
In a medium saucepan, whisk together the coconut milk, brown sugar, egg yolks, and salt, then add the butter. Cook over medium-low heat, stirring constantly, for 8 to 10 minutes, until the mixture thickens enough to coat the back of a spoon and turns a light caramel color.Remove from the heat and stir in the shredded coconut, toasted pecans, and vanilla. Let cool, then cover and refrigerate until cold.
In a clean saucepan, whisk together the sugar, cocoa powder, and salt, then slowly whisk in the coconut milk and corn syrup until smooth. Cook over medium heat, whisking often, for 5 to 6 minutes, until steaming and just starting to bubble around the edges.
Remove from the heat and whisk in the chopped chocolate and vanilla until melted and glossy. Pour into a bowl, press plastic wrap onto the surface, and refrigerate for at least 6 hours or overnight.
Whisk the chilled base well, then pour it into an ice cream maker bowl that has been frozen for at least 24 hours. Churn for 20 to 25 minutes, until thick and creamy like soft serve.
Spread one third of the chocolate ice cream into a 9x5-inch loaf pan and dot with spoonfuls of the coconut pecan swirl. Repeat the layers two more times, then gently swirl with a skewer.
Cover tightly and freeze for 4 to 6 hours, until firm. Let sit at room temperature for 10 minutes before scooping.