dataTypeConstrs gives unhelpful error message
Take the following program:
import Data.Data
foo = dataTypeConstrs (dataTypeOf (0 :: Int))
-- raises: *** Exception: Data.Data.dataTypeConstrs
The implementation of dataTypeConstrs
has the type available as a string at this point, so could easily say:
Exception: Data.Data.dataTypeConstrs is not supported for Int,
as it is not an algebraic data type