Opened 6 years ago

Closed 6 years ago

#5274 closed bug (fixed)

Bad error message

Reported by: augustss Owned by:
Priority: normal Milestone:
Component: libraries/base Version: 7.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


From Data.Data

dataTypeConstrs dt = case datarep dt of
                        (AlgRep cons) -> cons
                        _ -> error "dataTypeConstrs"

That error message is a criminal offense. It should at a minimum say what module it comes from.

Change History (1)

comment:1 Changed 6 years ago by simonpj

Resolution: fixed
Status: newclosed

I agree. I've added the module and a bit more to all the calls to error in Data.Data

commit 26b5bd718d5baaf90ed8da9576ba1a090adc7e04
Author: Simon Peyton Jones <>
Date:   Fri Jul 1 17:59:57 2011 +0100

    Make the calls to 'error' more informative (Trac #5274)

 Data/Data.hs |   90 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 45 insertions(+), 45 deletions(-)
Note: See TracTickets for help on using tickets.