Hi,
I'd like to learn how to use ghc rewrite rules. I simply want to
replace a function called f by a function called g. I do not
unterstand why the rule f->g does not fire.
Cheers, Jan
module Main where
{-# RULES
"f->g" forall x. f x = g x
#-}
main :: IO ()
main = print (f 1)
{-# NOINLINE f #-}
f :: a -> Bool
f _ = False
g :: a -> Bool
g _ = True
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users