bugs around tagToEnum#
i've enclosed 3 modules which reports various problems. all they use tagToEnum# and these bugs may be is because of the following, stated in CgExpr.lhs:
-- If you're reading this code in the attempt to figure
-- out why the compiler panic'ed here, it is probably because
-- you used tagToEnum# in a non-monomorphic setting, e.g.,
-- intToTg :: Enum a => Int -> a ; intToTg (I# x#) = tagToEnum# x#
-- That won't work.
tycon = tyConAppTyCon res_ty