The habitats where pill sedge~(Carex pilulifera) grows:

Alpine and subalpine calcareous grassland
Altantic hazel wood
Atlantic oak wood
Beech wood
Blanket bog
Brownfield
Caledonian forest
Hard cliff and cliff slope
High montane heath and snow bed
Limestone pavement
Lowland dry acid grassland
Lowland dry heath
Lowland wet heath
Montane dwarf shrub heath
Raised bog
Sand dune
Upland acid grassland
Upland birch wood
Upland calcareous grassland
Upland dry heath
Upland wet heath
Wood pasture