[Haskell] modern language design, stone age tools

MR K P SCHUPKE k.schupke at imperial.ac.uk
Wed Jun 23 13:52:32 EDT 2004

>So how do you debug problems like "Prelude.head: empty list"
>in large programs?

I normally dont use head, but instead code:

	case x of
	   (a0:_) -> <expr1>
	   _ -> fail <debug info>

for precisely this reason - and the fact that I dont like bindings
that can fail... 


More information about the Haskell mailing list