[redirecting from [EMAIL PROTECTED] apfelmus wrote: [...] > I wonder whether a multi parameter type class without fundeps/associated > types would be better. > > class Fixpoint f t where > inject :: f t -> t > project :: t -> f t > [...] > Interestingly, this even gives slightly shorter type signatures > > cata :: Fixpoint f t => (f s -> s) -> t -> s > size :: (Fixpoint f t, Foldable f) => t -> Int
size can't be used now though, because there is no way to infer f. Bertram _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe