[Haskell-cafe] Re: Curious Functor Class

Ashley Yakeley ashley at semantic.org
Thu Sep 28 03:59:27 EDT 2006


On Sep 28, 2006, at 00:38, Jeremy Gibbons wrote:

>> Perhaps the key is that there exist types P and Q s.t. there's an  
>> isomorphism
>>
>>   F a <=> (P -> a,Q)
>
> F is Naperian iff there's a P with F a = P -> a; but what's the Q for?
>
>> This seems to be intuitively Napierian:
>>
>>   ln (P -> a,Q) = (P,ln a) | ln Q
>>
>> I can believe that Hoistables are in fact Idioms, though I know  
>> there are Idioms that are not Hoistables (Maybe and Either, for  
>> instance).
>
> That's right. Every Monad is an Idiom. So are constant functors (F  
> a = Int) - which I guess a Naperian anyway.

Hoistables are not always Idioms, it turns out. I think this can be  
made a Hoistable, but not an Idiom (because it has a "Q"):

   type WithInt = (,) Int -- i.e. WithInt a = (Int,a)

I don't know if that counts as Napierian or not.

>> (Also I think "Idiom" is a better class name than "Applicative".)
>
> Me too! Can you tell Ross and Conor? I've tried...

Hey Ross, Conor, "Idiom" is a better name than "Applicative". Pretty  
much everyone thinks so.

>    *
>
> I don't subscribe to haskell-cafe, so apparently I can't post. Feel  
> free to post my reply there, if you think it is useful.


-- 
Ashley Yakeley




More information about the Haskell-Cafe mailing list