
21 Apr
2014
21 Apr
'14
9:01 a.m.
On 2014-04-20 at 23:48:06 +0200, Edward Kmett wrote:
if' is a commonly used name in user code for what is now called bool, but it also gets used all over the place for 'if' inside of EDSLs.
Just a minor nit-pick, I had always assumed if' and bool had different argument ordering: bool :: a -> a -> Bool -> a bool f _ False = f bool _ t True = t (following the style of 'either'/'maybe') vs. if' :: Bool -> a -> a -> a if' True x _ = x if' False _ y = y (see http://www.haskell.org/haskellwiki/If-then-else)