Proposal: rename Data.Map.fromAscList to Data.Map.unsafeFromAscList

Neil Mitchell ndmitchell at
Fri Apr 24 09:21:11 EDT 2009


> Do I really need to point out the difference between head and fromAscList?
> fromAscList is total but may badly destroy the internal (invariant of
> the) representation. head at least crashes (hopefully fairly soon) when
> called wrongly.

Better example, sortBy f, where f isn't a valid ordering function. It
works, but destroyed internal invariants. Should it be uncheckedSortBy
f ?



More information about the Libraries mailing list