base: Enable listToMaybe to fuse via foldr/build

Authored by Douglas Wilson <douglas.wilson@gmail.com> on Oct 25 2017, 6:05 PM.

Description

base: Enable listToMaybe to fuse via foldr/build

Test Plan: Consider whether this is a good idea.

Reviewers: austin, hvr, bgamari, nomeata

Reviewed By: bgamari, nomeata

Subscribers: nomeata, rwbarton, thomie

GHC Trac Issues: Trac #14387

Differential Revision: https://phabricator.haskell.org/D4126