summaryrefslogtreecommitdiff
path: root/compiler/simplCore
diff options
context:
space:
mode:
authorDavid Feuer <david.feuer@gmail.com>2017-04-02 16:20:20 -0400
committerDavid Feuer <David.Feuer@gmail.com>2017-04-02 16:20:22 -0400
commitbf5e0eab60a11d494671793740122e381a707c1a (patch)
tree08c50b4294e3265d994a1452f829aca59e3dacd4 /compiler/simplCore
parent911055689eca26c7c2713e251646fa35359acba3 (diff)
downloadhaskell-bf5e0eab60a11d494671793740122e381a707c1a.tar.gz
Derive the definition of null
We can sometimes produce much better code by deriving the definition of `null` rather than using the default. For example, given data SnocList a = Lin | Snoc (SnocList a) a the default definition of `null` will walk the whole list, but of course we can stop as soon as we see `Snoc`. Similarly, if a constructor contains some other `Foldable` type, we want to use its `null` rather than folding over the structure. Partially fixes Trac #13280 Reviewers: austin, bgamari, RyanGlScott Reviewed By: RyanGlScott Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3402
Diffstat (limited to 'compiler/simplCore')
0 files changed, 0 insertions, 0 deletions