
20 Nov
2007
20 Nov
'07
11:04 a.m.
[redirecting from haskell@...] 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