[commit: ghc] wip/cheap-build: Use cheapBuild for enumerating Chars (5909cee)

git at git.haskell.org git at git.haskell.org
Thu Mar 16 17:21:00 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/cheap-build
Link       : http://ghc.haskell.org/trac/ghc/changeset/5909ceed698c8d893bb01f0dc1fd814672e760f2/ghc

>---------------------------------------------------------------

commit 5909ceed698c8d893bb01f0dc1fd814672e760f2
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Tue Aug 4 09:08:39 2015 +0200

    Use cheapBuild for enumerating Chars


>---------------------------------------------------------------

5909ceed698c8d893bb01f0dc1fd814672e760f2
 libraries/base/GHC/Enum.hs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libraries/base/GHC/Enum.hs b/libraries/base/GHC/Enum.hs
index feb4585..e2655c9 100644
--- a/libraries/base/GHC/Enum.hs
+++ b/libraries/base/GHC/Enum.hs
@@ -320,9 +320,9 @@ instance  Enum Char  where
 
 -- See Note [How the Enum rules work]
 {-# RULES
-"eftChar"       [~1] forall x y.        eftChar x y       = build (\c n -> eftCharFB c n x y)
-"efdChar"       [~1] forall x1 x2.      efdChar x1 x2     = build (\ c n -> efdCharFB c n x1 x2)
-"efdtChar"      [~1] forall x1 x2 l.    efdtChar x1 x2 l  = build (\ c n -> efdtCharFB c n x1 x2 l)
+"eftChar"       [~1] forall x y.        eftChar x y       = cheapBuild (\c n -> eftCharFB c n x y)
+"efdChar"       [~1] forall x1 x2.      efdChar x1 x2     = cheapBuild (\ c n -> efdCharFB c n x1 x2)
+"efdtChar"      [~1] forall x1 x2 l.    efdtChar x1 x2 l  = cheapBuild (\ c n -> efdtCharFB c n x1 x2 l)
 "eftCharList"   [1]  eftCharFB  (:) [] = eftChar
 "efdCharList"   [1]  efdCharFB  (:) [] = efdChar
 "efdtCharList"  [1]  efdtCharFB (:) [] = efdtChar



More information about the ghc-commits mailing list