@@ -338,10 +338,15 @@ elabPE info fc caller r =
338338 -- want to be a PE version of those next)
339339 let cgns' = filter (\x -> x /= n &&
340340 notStatic ist x) cgns
341+ -- set small reduction limit on partial/productive things
342+ let maxred = case lookupTotal n (tt_ctxt ist) of
343+ [Total _] -> 65536
344+ [Productive] -> 16
345+ _ -> 1
341346 let opts = [Specialise ((if pe_simple specdecl
342347 then map (\x -> (x, Nothing)) cgns'
343348 else []) ++
344− (n, Just 65536) :
349+ (n, Just maxred) :
345350 mapMaybe (specName (pe_simple specdecl))
346351 (snd specapp))]
347352 logLvl 3 $ "Specialising application: " ++ show specapp