diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-05-20 12:48:03 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-05-20 16:29:18 -0400 |
commit | 80d5190630a975dfa03d1d84d23cdee4f950d58d (patch) | |
tree | 97b1c427d86bc324de6c04825e263216b55ead17 /libraries/base/Data/Either.hs | |
parent | 53c78be0aab76a3107c4dacbb1d177afacdd37fa (diff) | |
download | haskell-80d5190630a975dfa03d1d84d23cdee4f950d58d.tar.gz |
base: Explicitly mark Data.Either.{left,right} as INLINABLE
Test Plan: read it
Reviewers: dfeuer, austin, hvr, nomeata
Reviewed By: dfeuer, nomeata
Subscribers: nomeata, rwbarton, thomie
GHC Trac Issues: #13689
Differential Revision: https://phabricator.haskell.org/D3576
Diffstat (limited to 'libraries/base/Data/Either.hs')
-rw-r--r-- | libraries/base/Data/Either.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libraries/base/Data/Either.hs b/libraries/base/Data/Either.hs index 437d87cb5e..2469e78511 100644 --- a/libraries/base/Data/Either.hs +++ b/libraries/base/Data/Either.hs @@ -178,6 +178,7 @@ either _ g (Right y) = g y -- lefts :: [Either a b] -> [a] lefts x = [a | Left a <- x] +{-# INLINEABLE lefts #-} -- otherwise doesnt get an unfolding, see #13689 -- | Extracts from a list of 'Either' all the 'Right' elements. -- All the 'Right' elements are extracted in order. @@ -192,6 +193,7 @@ lefts x = [a | Left a <- x] -- rights :: [Either a b] -> [b] rights x = [a | Right a <- x] +{-# INLINEABLE rights #-} -- otherwise doesnt get an unfolding, see #13689 -- | Partitions a list of 'Either' into two lists. -- All the 'Left' elements are extracted, in order, to the first |