diff options
author | simonpj@microsoft.com <unknown> | 2010-12-15 12:18:17 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2010-12-15 12:18:17 +0000 |
commit | 35a77384d096e9cec8488f09ddaee533ad61051a (patch) | |
tree | 6ca3ec3cb0690410f5ba682a53f6cf0941de7574 | |
parent | da43a382ccc7d3c57068976c312dc583fddc7498 (diff) | |
download | haskell-35a77384d096e9cec8488f09ddaee533ad61051a.tar.gz |
Allow enumerations to have phantom arguments.
The bytecode generator was being too eager.
Fixes Trac #4528, or rather, a near variant.
-rw-r--r-- | compiler/ghci/ByteCodeGen.lhs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/ghci/ByteCodeGen.lhs b/compiler/ghci/ByteCodeGen.lhs index e0920fc2f1..f34ac9c172 100644 --- a/compiler/ghci/ByteCodeGen.lhs +++ b/compiler/ghci/ByteCodeGen.lhs @@ -640,13 +640,13 @@ schemeT d s p app -- Detect and extract relevant info for the tagToEnum kludge. maybe_is_tagToEnum_call = 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) in case app of (AnnApp (_, AnnApp (_, AnnVar v) (_, AnnType t)) arg) |