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

Christian Maeder Christian.Maeder at
Fri Apr 24 09:10:57 EDT 2009

Neil Mitchell wrote:
> Hi,
> I totally disagree. unsafe/unchecked means nothing other than "beware
> of the bogey monster", or for most Haskell users, "just another
> function that might launch missiles". fromAscList has the specific
> precondition for this function in the name. Should we call unsafeHead?
> uncheckedHead? mightCrashIfNotConsHead?

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.


More information about the Libraries mailing list