Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Is there a name for the following? (Gregory Malecha)
2. Re: Is there a name for the following? (Tony Morris)
3. Re: Is there a name for the following? (Brent Yorgey)
----------------------------------------------------------------------
Message: 1
Date: Sun, 1 Jun 2014 17:55:21 -0400
From: Gregory Malecha <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] Is there a name for the following?
Message-ID:
<cagraihlgfajb3fobomreu_bg80hsw6+4k9oorcamn24pgc4...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hello --
I'm wondering if there is any "name" for a functor "F" that has a function
with the following type:
(a -> F b) -> F (a -> b)
or
(F a -> F b) -> F (a -> b)
If there is, I would imagine it being related to Applicative in some way,
though clearly there are many Applicatives that do not have an
implementation of this.
Thanks.
--
gregory malecha
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20140601/ac1de26d/attachment-0001.html>
------------------------------
Message: 2
Date: Mon, 02 Jun 2014 10:09:47 +1000
From: Tony Morris <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] Is there a name for the following?
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Doubt it. What would be the instances?
What resulted in this requirement? Data.Distributive might help. Just
guessing.
On 02/06/14 07:55, Gregory Malecha wrote:
> Hello --
>
> I'm wondering if there is any "name" for a functor "F" that has a
> function with the following type:
>
> (a -> F b) -> F (a -> b)
>
> or
>
> (F a -> F b) -> F (a -> b)
>
> If there is, I would imagine it being related to Applicative in some
> way, though clearly there are many Applicatives that do not have an
> implementation of this.
>
> Thanks.
>
> --
> gregory malecha
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
--
Tony Morris
http://tmorris.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20140602/3fcb8fda/attachment-0001.html>
------------------------------
Message: 3
Date: Sun, 1 Jun 2014 21:58:20 -0400
From: Brent Yorgey <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] Is there a name for the following?
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Gregory,
On Sun, Jun 01, 2014 at 05:55:21PM -0400, Gregory Malecha wrote:
> Hello --
>
> I'm wondering if there is any "name" for a functor "F" that has a function
> with the following type:
>
> (a -> F b) -> F (a -> b)
>
> or
>
> (F a -> F b) -> F (a -> b)
>
> If there is, I would imagine it being related to Applicative in some way,
> though clearly there are many Applicatives that do not have an
> implementation of this.
As for the first type, any distributive/representable functor
(http://hackage.haskell.org/package/distributive-0.4/docs/Data-Distributive.html#t:Distributive,
http://hackage.haskell.org/package/adjunctions-4.0.3/docs/Data-Functor-Rep.html)
will have such a function---that is, when F a is isomorphic to (r ->
a) for some type r. Then it is just
(a -> r -> b) -> (r -> a -> b)
I rather suspect that these are the *only* functors that will work,
but I'm not sure how to prove it off the top of my head. Intuitively,
if F does not have some fixed structure, i.e. it is isomorphic to a
sum type, then (given that 'a' can be infinite) there is no way to
combine the infinitely many F structures resulting from the (a -> F b)
function into a single F structure on the right.
Relatedly, you may be interested in
http://winterkoninkje.dreamwidth.org/81209.html
http://hackage.haskell.org/package/countable-0.1/docs/Data-Searchable.html#t:Finite
which are very similar, although they quantify over 'a' rather than 'F'.
I do not have any good intuition about the second type.
-Brent
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 72, Issue 1
****************************************