On Thu, 2007-09-13 at 13:56 +0100, Neil Mitchell wrote: > > tail = fromJust . tailMay > > The error messages suffer [..] > That's why I supplied tailNote
Still, given tailMay, we have: tailDef xs = maybe xs id . tailMay tailNote msg = tailDef (error msg) tailSafe = tailDef [] tail = tailNote "tail: empty list" which I suppose was Lutz's point? (My rather ugly preference is to #define tail so that an error message contains source code location.) -k _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
