[Haskell-cafe] Prelude.head: empty list

Marcin Mrotek marcin.jan.mrotek at gmail.com
Fri Mar 11 18:18:56 UTC 2016


Could you perhaps change every `head` to a pattern match with `[] ->
error "impossible, because..."` to see what impossible happened? It
could help when some other impossible happens later. Other than that,
located-base that Bryan Richter mentioned looks useful too.

Best regards,
Marcin Mrotek


More information about the Haskell-Cafe mailing list