hackport: Prelude.foldl1: empty list

Use foldl1 instead of foldl