Skip to content
Snippets Groups Projects
Commit ccb7d96d authored by Simon Peyton Jones's avatar Simon Peyton Jones Committed by Austin Seipp
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

(cherry picked from commit 327ce1d3)
parent bba041e0
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment