[Haskell-cafe] Relating functors in Category Theory to Functor

Iavor S. Diatchki diatchki at cse.ogi.edu
Fri Jul 2 14:13:28 EDT 2004


hello,
i was thinking of higher-order functions, which i think complicate things
(i might be wrong though :-)

for example:
fix :: (a -> a) -> a
is ploymorphic, but is it a natural tranformation?
i belive it is in fact a di-natural transformation.
-iavor

> On Jun 29, 2004, at 6:46 PM, Iavor S. Diatchki wrote:
>
>>>> In Haskell, natural transformations are polymorphic functions, tau 
>>>> :: f a -> g a. For example, maybeToList :: Maybe a -> [a].
>>>>
>> actually i think this is a good approximation.  not all polymorphic 
>> functions are natural transformations, but "simple" ones usually are.
>
>
> I think you have it backwards, unless you are thinking of a more 
> general notion of polymorphism than parametric polymorphism.
>
> Ad hoc polymorphic functions may or may not be natural; you have to 
> verify the naturality condition in each case.
>
> But every parametrically polymorphic function is a natural 
> transformation, though the converse fails: not every natural 
> transformation is parametrically polymorphic. In particular, some 
> natural transformations are generic functions (polytypic), and their 
> components (instantiations at a type) are not all instances of a 
> single algorithm.
>
> I'm not sure if every natural transformation on endofunctors on a 
> category modelling a Haskell-like language is denoted by either a 
> parametric or generic term.
>
> Regards,
> Frank




More information about the Haskell-Cafe mailing list