Commit 35a77384 authored by's avatar

Allow enumerations to have phantom arguments.

The bytecode generator was being too eager.
Fixes Trac #4528, or rather, a near variant.
parent da43a382
......@@ -640,13 +640,13 @@ schemeT d s p app
-- Detect and extract relevant info for the tagToEnum kludge.
= let extract_constr_Names ty
| Just (tyc, []) <- splitTyConApp_maybe (repType ty),
| Just (tyc, _) <- splitTyConApp_maybe (repType ty),
isDataTyCon tyc
= map (getName . dataConWorkId) (tyConDataCons tyc)
-- NOTE: use the worker name, not the source name of
-- the DataCon. See DataCon.lhs for details.
| otherwise
= panic "maybe_is_tagToEnum_call.extract_constr_Ids"
= pprPanic "maybe_is_tagToEnum_call.extract_constr_Ids" (ppr ty)
case app of
(AnnApp (_, AnnApp (_, AnnVar v) (_, AnnType t)) arg)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment