Preheat the oven to 150°C. Bring the stout to the boil in a saucepan and boil vigorously until reduced to 1 cup. Cover the bottom of a heavy casserole with the sliced onions, then place the carrots on top, followed by the beef, whole onions and pork. Tie the herbs and allspice in a small square of muslin and bury this in the casserole with the garlic. Pour the hot reduced stout into the casserole. Season with a little salt and lots of pepper. Not much liquid will be visible at this stage.
In a small bowl, mix the flour to a smooth, pliable dough with the water. Roll the dough into a long sausage. Place the lid on the casserole, wet the edges with a little water and seal the join with the dough strip.
Cook the casserole in the centre of the oven for 3 hours. Remove the casserole from the oven and break the dough seal. Remove and discard the bag of herbs, stir the meat and vegetables together carefully and serve with potatoes and a green vegetable.
Carbonnade of Beef: Use beer instead of stout, omit the carrots, pork and allspice, and pour 1 cup beef stock, flavoured with 1/2 teaspoon each of sugar and nutmeg and 1 teaspoon vinegar, over the ingredients before sealing the casserole with the dough. After discarding the dough seal and bag of herbs, cover the top of the casserole with baguette slices spread with Dijon mustard, pushing them down into the gravy. Cook uncovered for a further 30 minutes (the bread will float to the top and form a brown crust).