You cannot "use Prices as a Map", because Prices is not a Map. The way you have defined it, Prices is a different type, not at all the same as a Map, but it contains an instance of a Map inside it.
If this is indeed what you meant, then in order to get the Map out of a Prices value, you need to pattern-match on it. Like this:
let GetSalePrice (Prices theMap) = theMap |> Map.map ...
Whoa, what's going on here? How is Prices theMap different from prices: Prices? Why are we putting the type name in front of the parameter rather than behind it via a colon? Isn't that how types are denoted in F#?
You may have a bit of a confusion because you're using the same name Prices for both the type and its constructor. To clear this up, let me redefine your type like this:
type PricesType = PricesCtor of Map<string, int>
Now the function would look like:
let GetSalePrice (PricesCtor theMap) = theMap |> Map.map ...
So you see, it's not the type that we're putting in front of the parameter. It's the constructor. And this declaration - (PricesCtor theMap) - tells the compiler that we're expecting a parameter of type PricesType (because that's where PricesCtor belongs), and when we get this parameter, it should be unwrapped, and the map contained within should be named theMap.
This whole process is called "pattern matching". Here, we're matching on the constructor PricesCtor.
Your original function, on the other hand, merely specified the type of the parameter. With my new type definition I might write your original function like this:
let GetSalePrice (prices: PricesType) = prices |> Map.map ...
Here, we specify that our parameter should have type PricesType, but then we're trying to use it as an argument for Map.map, which expects a parameter of type Map<_,_>. No wonder there is a type mismatch!
Pattern matching doesn't have to be in the parameter declaration either. You can pattern-match anywhere in the code. To do that, use the match keyword. This is how your function may be written that way:
let GetSalePrice prices =
match prices with
| PricesCtor theMap -> theMap |> Map.map ...
The match keyword becomes significant as soon as your type has more than one constructor. For example:
type PricesType = PricesAsAMap of Map<string, int> | SinglePrice as int
In this case, if you specify the pattern in the parameter declaration:
let GetSalePrice (PricesAsAMap theMap) = ...
the compiler will warn you that the pattern match is incomplete. Indeed, your function knows what to do when given a SinglePrice value, but what should it do when given a ConstantPrice? You haven't defined that, so the compiler will complain.
This setup is an occasion to use the match keyword:
let GetSalePrice prices =
match prices with
| PricesAsAMap theMap -> theMap |> Map.map ...
| SinglePrice p -> "single item", p