I noticed that the instances for Map, Set, IntMap, and IntSet are "unsafe" in the sense that they will happily build structures that don't obey the expected invariants if they are presented with improperly ordered input. Is this acceptable behavior (i.e., is get only supposed to be used with trusted input)? Or should the invocations of fromDistinctAscList be replaced with fromList?
I noticed that the instances for
Map
,Set
,IntMap
, andIntSet
are "unsafe" in the sense that they will happily build structures that don't obey the expected invariants if they are presented with improperly ordered input. Is this acceptable behavior (i.e., isget
only supposed to be used with trusted input)? Or should the invocations offromDistinctAscList
be replaced withfromList
?