Commit 327ce1d3 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Return a [HsImplBang] from dataConImplBangs even with NoDataConRep

This fixes Trac #9969, a new crash in T7562 that I somehow missed when
fiddling with HsBang
parent 0bef02e4
......@@ -830,9 +830,10 @@ dataConRepStrictness dc = case dcRep dc of
dataConImplBangs :: DataCon -> [HsImplBang]
-- The implementation decisions about the strictness/unpack of each
-- source program argument to the data constructor
dataConImplBangs dc = case dcRep dc of
NoDataConRep -> dcSrcBangs dc
DCR { dcr_bangs = bangs } -> bangs
dataConImplBangs dc
= case dcRep dc of
NoDataConRep -> replicate (dcSourceArity dc) HsNoBang
DCR { dcr_bangs = bangs } -> bangs
dataConBoxer :: DataCon -> Maybe DataConBoxer
dataConBoxer (MkData { dcRep = DCR { dcr_boxer = boxer } }) = Just boxer
......
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