[commit: vector] : Add delayed_min (e9a239d)
Roman Leshchinskiy
rl at cse.unsw.edu.au
Sun Jun 19 23:15:50 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/vector
On branch :
http://hackage.haskell.org/trac/ghc/changeset/e9a239d336346818ec245e5894c5f31ed03022e2
>---------------------------------------------------------------
commit e9a239d336346818ec245e5894c5f31ed03022e2
Author: Roman Leshchinskiy <rl at cse.unsw.edu.au>
Date: Sat May 14 11:01:04 2011 +0000
Add delayed_min
>---------------------------------------------------------------
Data/Vector/Fusion/Util.hs | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Data/Vector/Fusion/Util.hs b/Data/Vector/Fusion/Util.hs
index be673d9..c84abbb 100644
--- a/Data/Vector/Fusion/Util.hs
+++ b/Data/Vector/Fusion/Util.hs
@@ -13,7 +13,7 @@
module Data.Vector.Fusion.Util (
Id(..), Box(..),
- delay_inline
+ delay_inline, delayed_min
) where
-- | Identity monad
@@ -41,4 +41,8 @@ delay_inline :: (a -> b) -> a -> b
{-# INLINE [0] delay_inline #-}
delay_inline f = f
+-- | `min` inlined in phase 0
+delayed_min :: Int -> Int -> Int
+{-# INLINE [0] delayed_min #-}
+delayed_min m n = min m n
More information about the Cvs-libraries
mailing list