On Tue, May 08, 2007 at 05:59:48PM -0700, David Roundy wrote: > Couldn't you do the same without branding if you simply made your function > polymorphic: > > data Bundle a = Bundle a a > > d :: Num a => (forall b. Num b => b -> b) -> a -> a > d f x = let (Bundle y y') = f (Bundle x 1) in y' > > and defined > > lift x = Bundle x 0
I take it back. This lift won't work. You need a lift with the type lift :: (Num a, Num b) -> a -> b which would obviously need to be added to a class that would take the place of Num here... -- David Roundy Department of Physics Oregon State University _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe