Commit 5b9846a5 authored by Matthew Pickering's avatar Matthew Pickering Committed by Zubin
Browse files

Make setBndrsDemandInfo work with only type variables

Fixes #19849

Co-authored-by: Krzysztof Gogolewski's avatarKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>

(cherry picked from commit c4099b09)
parent aa3bbb77
Pipeline #37343 failed with stages
in 424 minutes
......@@ -1233,9 +1233,9 @@ dictionaries.
-}
setBndrsDemandInfo :: [Var] -> [Demand] -> [Var]
setBndrsDemandInfo (b:bs) (d:ds)
| isTyVar b = b : setBndrsDemandInfo bs (d:ds)
| otherwise = setIdDemandInfo b d : setBndrsDemandInfo bs ds
setBndrsDemandInfo (b:bs) ds
| isTyVar b = b : setBndrsDemandInfo bs ds
setBndrsDemandInfo (b:bs) (d:ds) = setIdDemandInfo b d : setBndrsDemandInfo bs ds
setBndrsDemandInfo [] ds = ASSERT( null ds ) []
setBndrsDemandInfo bs _ = pprPanic "setBndrsDemandInfo" (ppr bs)
......
module T19849 where
data T where
C :: forall k. T
f :: T -> ()
f C = ()
......@@ -66,3 +66,4 @@ test('T18894b', [ grep_errmsg(r'Arity=2') ], compile, ['-ddump-stranal -dsuppre
test('T18982', [ grep_errmsg(r'\$w. .*Int#$') ], compile, ['-dppr-cols=1000 -ddump-simpl -dsuppress-idinfo -dsuppress-uniques'])
test('T19180', normal, compile, [''])
test('T19849', normal, compile, [''])
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