[commit: ghc] wip/cheap-build-osa1: Use cheapBuild for enumerating Chars (3b255ae)

git at git.haskell.org git at git.haskell.org
Wed Feb 21 06:50:25 UTC 2018


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

On branch  : wip/cheap-build-osa1
Link       : http://ghc.haskell.org/trac/ghc/changeset/3b255ae98bf01cbdb0387c6027c1adf338952ccb/ghc

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

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

    Use cheapBuild for enumerating Chars


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

3b255ae98bf01cbdb0387c6027c1adf338952ccb
 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