Change an "undefined" into a more informative error; trac #2782
authorIan Lynagh <igloo@earth.li>
Sun, 16 Nov 2008 16:02:28 +0000 (16:02 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 16 Nov 2008 16:02:28 +0000 (16:02 +0000)
Data/Data.hs

index 0ef5fd3..930fcdd 100644 (file)
@@ -432,7 +432,7 @@ newtype Mp m x = Mp { unMp :: m (x, Bool) }
 
 -- | Build a term skeleton
 fromConstr :: Data a => Constr -> a
-fromConstr = fromConstrB undefined
+fromConstr = fromConstrB (error "Data.Data.fromConstr")
 
 
 -- | Build a term and use a generic function for subterms