In a large pot over medium heat, saute the onion and garlic in the oil until softened but not browned.
Sprinkle with flour and cook for 30 seconds, stirring well.
Slowly add the stock, stirring well to prevent lumps, then stir in the milk.
Bring to a boil, stirring until thickened. Add the carrots and potatoes.
Simmer and cook for about 20 minutes, stirring occasionally. Test potatoes for tenderness, then stir in ham and cheese.
Season to taste with salt and pepper.
Garnish with green onions, if desired, and serve.
Notes
Want to make this gluten free? Sauté the onion in just 1 tablespoon of oil. Leave out the flour. Proceed with recipe as usual. Before adding ham and cheese, mash some of the potatoes to thicken the soup.