[commit: ghc] master: GHC.Generics: Ensure some, many for U1 don't bottom (890e2bb)
git at git.haskell.org
git at git.haskell.org
Fri Feb 26 22:01:02 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/890e2bb72b9953ca3e6990911b4cf6e51a0dd0f8/ghc
>---------------------------------------------------------------
commit 890e2bb72b9953ca3e6990911b4cf6e51a0dd0f8
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Fri Feb 26 23:02:31 2016 +0100
GHC.Generics: Ensure some, many for U1 don't bottom
Reviewers: austin, hvr, ekmett, RyanGlScott
Reviewed By: RyanGlScott
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1952
GHC Trac Issues: #11650
>---------------------------------------------------------------
890e2bb72b9953ca3e6990911b4cf6e51a0dd0f8
libraries/base/GHC/Generics.hs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libraries/base/GHC/Generics.hs b/libraries/base/GHC/Generics.hs
index 4e01c13..f723127 100644
--- a/libraries/base/GHC/Generics.hs
+++ b/libraries/base/GHC/Generics.hs
@@ -745,6 +745,9 @@ instance Applicative U1 where
instance Alternative U1 where
empty = U1
U1 <|> U1 = U1
+ -- The defaults will otherwise bottom; see #11650.
+ some U1 = U1
+ many U1 = U1
instance Monad U1 where
U1 >>= _ = U1
More information about the ghc-commits
mailing list