[Haskell-cafe] Is there a way to make this code compose generic ?