On Mon, May 16, 2011 at 3:49 PM, austin seipp <[email protected]> wrote: > I don't know why GHC doesn't have this rule by default, though. We can > at least rig it with a RULES pragma, however: > > $ cat concatmap.hs > module Main where > > {-# RULES > "concatMap/foldr" forall x k. concatMap k x = foldr ((++) . k) [] x > #-}
Well, that's the definition of concatMap :) [1], at least since as long as Hackage can go [2]. So the problem seems something else. Cheers, [1] http://hackage.haskell.org/packages/archive/base/4.3.1.0/doc/html/src/GHC-List.html#concatMap [2] http://hackage.haskell.org/packages/archive/base/3.0.3.1/doc/html/src/GHC-List.html#concatMap -- Felipe. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
