On 9/10/10 12:47 AM, David Menendez wrote:
It seems like you could use a similar argument to show that fmap id /= id.
Specifically, xs and map id xs are equivalent lists, but they occupy
different locations in memory. By replacing xs with map id xs, you can
come arbitrarily close to doubling a
On Wednesday 08 September 2010 11:17:43 pm wren ng thornton wrote:
-- | Proof that impure is not p...@e
fmap f (impure a)
== fmap f (E a a)
== E (f a) a
/= E (f a) (f a)
== impure (f a)
I don't believe your proof. The type of E is as follows:
E :: a - b - E
On 9/9/10 1:04 AM, David Menendez wrote:
Fascinating. I figured there might be a counter-example involving seq,
but this is pretty subtle.
In particular, would it be fair to say that in Haskell-without-seq, E
(f a) a and E (f a) (f a) are indistinguishable?
Yes, I think that without
On Thu, Sep 9, 2010 at 11:33 PM, wren ng thornton w...@freegeek.org wrote:
On 9/9/10 1:04 AM, David Menendez wrote:
Fascinating. I figured there might be a counter-example involving seq,
but this is pretty subtle.
In particular, would it be fair to say that in Haskell-without-seq, E
(f a) a
On 9/7/10 12:33 AM, Ivan Lazar Miljenovic wrote:
On 7 September 2010 14:24, wren ng thorntonw...@freegeek.org wrote:
On 9/7/10 12:04 AM, Ivan Lazar Miljenovic wrote:
Not quite sure what you mean by a mis-match
Just that they're not the same thing. For example, ZipList supports pure but
it
On 9/7/10 7:26 AM, Neil Brown wrote:
On 07/09/10 05:24, wren ng thornton wrote:
Just that they're not the same thing. For example, ZipList supports
pure but it has no meaningful instance of singleton since every
ZipList is infinite.
I don't believe that every ZipList is infinite (if this
On 9 September 2010 12:10, wren ng thornton w...@freegeek.org wrote:
I think the shape of the classes for singletons, insert, coinsert, and union
still needs some work. For instance, the definitions I've given earlier were
assuming a (multi)set-like or sequence-like container, but we can also
On 9/7/10 4:21 AM, Daniel Fischer wrote:
On Tuesday 07 September 2010 05:22:55, David Menendez wrote:
In fact, I think *every* appropriately-typed function satisfies that
law. Does anyone know of a counter-example?
-- | Multiply the *Hask* category by its number of objects.
data E a
On Wed, Sep 8, 2010 at 11:17 PM, wren ng thornton w...@freegeek.org wrote:
On 9/7/10 4:21 AM, Daniel Fischer wrote:
On Tuesday 07 September 2010 05:22:55, David Menendez wrote:
In fact, I think *every* appropriately-typed function satisfies that
law. Does anyone know of a counter-example?
On Tuesday 07 September 2010 05:22:55, David Menendez wrote:
On Mon, Sep 6, 2010 at 10:22 PM, wren ng thornton w...@freegeek.org
wrote:
On 9/6/10 1:33 PM, David Menendez wrote:
For that matter, can you even describe what pure is intended to do
without reference to* or join?
As already
2010/9/7 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com
2010/9/7 Gábor Lehel illiss...@gmail.com:
*That said*, I actually have nothing at all against splitting the 'a
- f a' method out into a separate class if you think it's useful,
whether you call it Pointed or something else. (And
From: Stephen Tetley stephen.tet...@gmail.com
On 6 September 2010 20:18, John Lato jwl...@gmail.com wrote:
Can you give an example of a Functor that doesn't have pure? I think
it's
Pointed Functors which are useful; not Functor by itself.
Strictly speaking is Pair one? The current
On 07/09/10 05:24, wren ng thornton wrote:
that other class would (most likely) be a subclass of pointed
functors. In
any case, it does mean there's something of a mismatch between
singleton vs
return/pure/point/unit.
Not quite sure what you mean by a mis-match
Of course, I'd expect
On 9/5/10 10:19 AM, Ivan Lazar Miljenovic wrote:
Hmmm is there any reason for Functor to be a superclass of
Pointed? I understand Functor and Pointed being superclasses of
Applicative (which in turn is a superclass of Monad), but can't see
any relation between Pointed and Functor...
On 6 September 2010 16:15, wren ng thornton w...@freegeek.org wrote:
On 9/5/10 10:19 AM, Ivan Lazar Miljenovic wrote:
Hmmm is there any reason for Functor to be a superclass of
Pointed? I understand Functor and Pointed being superclasses of
Applicative (which in turn is a superclass of
On Sun, Sep 5, 2010 at 7:18 PM, David Menendez d...@zednenem.com wrote:
On Sun, Sep 5, 2010 at 8:40 AM, John Lato jwl...@gmail.com wrote:
On Sat, Sep 4, 2010 at 12:34 PM, David Menendez d...@zednenem.com
wrote:
On Fri, Sep 3, 2010 at 8:23 AM, John Lato jwl...@gmail.com wrote:
+1
Message: 20
Date: Sat, 04 Sep 2010 03:40:49 -0400
From: wren ng thornton w...@freegeek.org
Subject: Re: [Haskell-cafe] Restricted type classes
To: Haskell Cafe haskell-cafe@haskell.org
Message-ID: 4c81f801@freegeek.org
Content-Type: text/plain; charset=UTF-8; format=flowed
On 9/3/10
On Mon, Sep 6, 2010 at 5:11 PM, John Lato jwl...@gmail.com wrote:
Message: 20
Date: Sat, 04 Sep 2010 03:40:49 -0400
From: wren ng thornton w...@freegeek.org
Subject: Re: [Haskell-cafe] Restricted type classes
To: Haskell Cafe haskell-cafe@haskell.org
Message-ID: 4c81f801@freegeek.org
On Mon, Sep 6, 2010 at 7:51 AM, John Lato jwl...@gmail.com wrote:
On Sun, Sep 5, 2010 at 7:18 PM, David Menendez d...@zednenem.com wrote:
On Sun, Sep 5, 2010 at 8:40 AM, John Lato jwl...@gmail.com wrote:
On Sat, Sep 4, 2010 at 12:34 PM, David Menendez d...@zednenem.com
wrote:
On
On Mon, Sep 6, 2010 at 12:33 PM, David Menendez d...@zednenem.com wrote:
On Mon, Sep 6, 2010 at 7:51 AM, John Lato jwl...@gmail.com wrote:
On Sun, Sep 5, 2010 at 7:18 PM, David Menendez d...@zednenem.com
wrote:
On Sun, Sep 5, 2010 at 8:40 AM, John Lato jwl...@gmail.com wrote:
On
On 6 September 2010 20:18, John Lato jwl...@gmail.com wrote:
Can you give an example of a Functor that doesn't have pure? I think it's
Pointed Functors which are useful; not Functor by itself.
Strictly speaking is Pair one? The current implementation tacks on monoid.
Best wishes
Stephen
On 9/6/10 2:35 AM, Ivan Lazar Miljenovic wrote:
Well, if we consider what this does, pure is equivalent to singleton
for container types. The actual definition of pure (or any other
aspect of Pointed) doesn't require Functor; however there are
properties for types that are instances of Functor
On 9/6/10 1:33 PM, David Menendez wrote:
For that matter, can you even describe what pure is intended to do
without reference to* or join?
As already stated: fmap f . pure = pure . f
--
Live well,
~wren
___
Haskell-Cafe mailing list
On Mon, Sep 6, 2010 at 10:22 PM, wren ng thornton w...@freegeek.org wrote:
On 9/6/10 1:33 PM, David Menendez wrote:
For that matter, can you even describe what pure is intended to do
without reference to* or join?
As already stated: fmap f . pure = pure . f
That's pretty general. For
2010/9/7 Gábor Lehel illiss...@gmail.com:
*That said*, I actually have nothing at all against splitting the 'a
- f a' method out into a separate class if you think it's useful,
whether you call it Pointed or something else. (And `class (Pointed f,
Functor f) = PointedFunctor f` is sort of
On 7 September 2010 12:18, wren ng thornton w...@freegeek.org wrote:
On 9/6/10 2:35 AM, Ivan Lazar Miljenovic wrote:
Well, if we consider what this does, pure is equivalent to singleton
for container types. The actual definition of pure (or any other
aspect of Pointed) doesn't require
On 9/7/10 12:04 AM, Ivan Lazar Miljenovic wrote:
Perhaps this just means that union/insert should be part of some other
class.
That is part of the plan (I'm tentatively calling the class with the
insert method Buildable or Extendable); this means that if a
type is an instance of Monoid (for
On 7 September 2010 14:24, wren ng thornton w...@freegeek.org wrote:
On 9/7/10 12:04 AM, Ivan Lazar Miljenovic wrote:
Perhaps this just means that union/insert should be part of some other
class.
That is part of the plan (I'm tentatively calling the class with the
insert method Buildable or
On Fri, Sep 3, 2010 at 12:01 PM, C. McCann c...@uptoisomorphism.net wrote:
On Fri, Sep 3, 2010 at 11:47 AM, John Lato jwl...@gmail.com wrote:
On Fri, Sep 3, 2010 at 1:29 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
On 3 September 2010 22:23, John Lato jwl...@gmail.com wrote:
On Sat, Sep 4, 2010 at 12:34 PM, David Menendez d...@zednenem.com wrote:
On Fri, Sep 3, 2010 at 8:23 AM, John Lato jwl...@gmail.com wrote:
+1 for using the proper constraints, and especially for bringing over
Pointed (and anything else that applies).
What's the argument for Pointed? Are
On 5 September 2010 22:40, John Lato jwl...@gmail.com wrote:
Having Pointed is categorically the right thing to do, which is why I argue
for its inclusion. Also, I think it would be prudent to avoid a situation
with the possibility of turning into a rehash of the
Functor/Applicative/Monad
On Sun, Sep 5, 2010 at 7:47 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
On 5 September 2010 22:40, John Lato jwl...@gmail.com wrote:
Having Pointed is categorically the right thing to do, which is why I
argue
for its inclusion. Also, I think it would be prudent to avoid a
Just because we don't have
a use now doesn't mean it might not be useful in the future.
I am suspicious about complicating a design for potential future
benefits.
However, difference lists provide an example of a type that support
Pointed more naturally than Applicative: the dlist package
On 6 September 2010 00:11, Sebastian Fischer
s...@informatik.uni-kiel.de wrote:
Just because we don't have
a use now doesn't mean it might not be useful in the future.
I am suspicious about complicating a design for potential future benefits.
However, difference lists provide an example of a
On Sun, Sep 5, 2010 at 8:40 AM, John Lato jwl...@gmail.com wrote:
On Sat, Sep 4, 2010 at 12:34 PM, David Menendez d...@zednenem.com wrote:
On Fri, Sep 3, 2010 at 8:23 AM, John Lato jwl...@gmail.com wrote:
+1 for using the proper constraints, and especially for bringing over
Pointed (and
On Sun, Sep 5, 2010 at 8:47 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
I _can_ think of a data type that could conceivably be an instance of
Pointed but not Applicative: a BloomFilter (though there's not really
any point in having a BloomFilter with only one value that I can
On 6 September 2010 04:25, David Menendez d...@zednenem.com wrote:
On Sun, Sep 5, 2010 at 8:47 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
I _can_ think of a data type that could conceivably be an instance of
Pointed but not Applicative: a BloomFilter (though there's not really
On 9/3/10 12:16 AM, Ivan Lazar Miljenovic wrote:
1) How should I name the kind * versions? For example, the kind *
version of Functor is currently called Mappable with a class method of
rigidMap. What should I call the kind * version of Foldable and its
corresponding methods? Is there a valid
On 4 September 2010 17:40, wren ng thornton w...@freegeek.org wrote:
On 9/3/10 12:16 AM, Ivan Lazar Miljenovic wrote:
1) How should I name the kind * versions? For example, the kind *
version of Functor is currently called Mappable with a class method of
rigidMap. What should I call the
On 9/4/10 3:50 AM, Ivan Lazar Miljenovic wrote:
On 4 September 2010 17:40, wren ng thorntonw...@freegeek.org wrote:
So, in the interest of generality, perhaps you should just pick a letter or
a short prefix and use that for each of the classes. In my blog posts I
called them 0-monads,
On 4 September 2010 18:27, wren ng thornton w...@freegeek.org wrote:
On 9/4/10 3:50 AM, Ivan Lazar Miljenovic wrote:
On 4 September 2010 17:40, wren ng thorntonw...@freegeek.org wrote:
So, in the interest of generality, perhaps you should just pick a letter
or
a short prefix and use that
On 4 September 2010 08:50, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
3) Am I wasting my time with this?
Not at all. Many people want a good containers API, and many people want a
cleaned up version of the categorical classes which isn't quite as involved
as category-extras. Go
On 4 September 2010 18:54, Stephen Tetley stephen.tet...@gmail.com wrote:
Supposing classes is the way to go, I think there's still a lot of
design work to be done on what the classes should be rather than how
they are implemented. The current design space (ListLike and your
Data.Containers)
On 4 September 2010 09:57, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
Where exactly can I find these observations on the analogies between
data structures and numerical representations?
Chris Okasaki - Chapter 9 of Purely Functional Data Structures.
Ralf Hinze's slides Number
I have only one thing to add to this discussion:
On Fri, Sep 3, 2010 at 5:16 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
2b) Is it OK to promote functions that use a class to being class
methods? When I was discussing this in #haskell several people
mentioned that defining
On Fri, Sep 3, 2010 at 8:23 AM, John Lato jwl...@gmail.com wrote:
Do you have a kind * implementation of Foldable? I'd be interested in
seeing it, because I was unable to create a usable implementation (based
upon the RMonad scheme) on my last attempt.
I always figured it would look something
On 5 September 2010 03:34, David Menendez d...@zednenem.com wrote:
On Fri, Sep 3, 2010 at 8:23 AM, John Lato jwl...@gmail.com wrote:
Do you have a kind * implementation of Foldable? I'd be interested in
seeing it, because I was unable to create a usable implementation (based
upon the RMonad
From: Ivan Lazar Miljenovic ivan.miljeno...@gmail.com
When I released the first version of container-classes (which I hacked
on during AusHac), some people said I should split out the various
folding, etc. into duplicates of the current Foldable class, etc.
rather than having large
On 3 September 2010 06:16, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
2c) Should I keep the classes as-is, or should I explicitly put in the
constraints mentioned in the Typeclassopedia (e.g. make Applicative an
explicit superclass of Monad, and define return = pure for
On Fri, Sep 3, 2010 at 11:47 AM, John Lato jwl...@gmail.com wrote:
On Fri, Sep 3, 2010 at 1:29 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
On 3 September 2010 22:23, John Lato jwl...@gmail.com wrote:
Do you have a kind * implementation of Foldable? I'd be interested in
When I released the first version of container-classes (which I hacked
on during AusHac), some people said I should split out the various
folding, etc. into duplicates of the current Foldable class, etc.
rather than having large monolithic classes.
I've been working on this (see my more recent
51 matches
Mail list logo