[Haskell-cafe] Re: ANNOUNCE: fixpoint 0.1
bertram.felgenhauer at googlemail.com
Tue Nov 20 11:04:46 EST 2007
[redirecting from haskell at ...]
> 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.
More information about the Haskell-Cafe