
On 01/09/2018 05:55 PM, David Feuer wrote:
The containers Haddock documentation currently represents sequences, sets, and maps via the relevant `fromList` function. For example, Data.Map gives the example
findWithDefault 'x' 1 (fromList [(5,'a'), (3,'b')]) == 'x'
I find these `fromList` calls exceedingly distracting, and I think they obscure the key ideas. Of course, I *could* just specify at the top that the documentation assumes OverloadedLists, but I think that's likely to be somewhat confusing, especially to beginners.
If you think that's confusing, just wait til you try to explain that unicode snowman means circumfix fromList. How about,
let map_with_no_1 = fromList [(5,'a'), (3,'b')] let default_value = 'x' findWithDefault default_value 1 map_with_no_1 == default_value True