Bonjour café,
Are there any functors f for which no point/pure/return :: a - f a exists?
Thank you,
Martijn.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Fri, Mar 13, 2009 at 03:18:15PM +0100, Martijn van Steenbergen wrote:
Are there any functors f for which no point/pure/return :: a - f a exists?
No. Choose an arbitrary element shape :: f () and define
point x = fmap (const x) shape
___
'An arbitrary element' means 'undefined will suffice'
point x = fmap (const x) undefined
2009/3/13 Ross Paterson r...@soi.city.ac.uk:
On Fri, Mar 13, 2009 at 03:18:15PM +0100, Martijn van Steenbergen wrote:
Are there any functors f for which no point/pure/return :: a - f a exists?
No.
On 13 Mar 2009, at 14:32, Ross Paterson wrote:
On Fri, Mar 13, 2009 at 03:18:15PM +0100, Martijn van Steenbergen
wrote:
Are there any functors f for which no point/pure/return :: a - f a
exists?
No. Choose an arbitrary element shape :: f () and define
point x = fmap (const x)
On Fri, Mar 13, 2009 at 02:32:23PM +, Ross Paterson wrote:
On Fri, Mar 13, 2009 at 03:18:15PM +0100, Martijn van Steenbergen wrote:
Are there any functors f for which no point/pure/return :: a - f a exists?
No. Choose an arbitrary element shape :: f () and define
point x =
Eugene Kirpichov wrote:
'An arbitrary element' means 'undefined will suffice'
point x = fmap (const x) undefined
Prelude fmap (const True) undefined :: [Bool]
*** Exception: Prelude.undefined
Or is that not what you mean?
Martijn.
___
On Fri, Mar 13, 2009 at 05:35:31PM +0300, Eugene Kirpichov wrote:
'An arbitrary element' means 'undefined will suffice'
point x = fmap (const x) undefined
This is false.
Prelude fmap (const 1) [()]
[1]
Prelude fmap (const 1) undefined
*** Exception: Prelude.undefined
-Brent
For most functors, that is equivalent to
point x = undefined
But by that logic, everything is a member of every typeclass...
--
Robin
On Fri, 13 Mar 2009 17:35:31 +0300
Eugene Kirpichov ekirpic...@gmail.com wrote:
'An arbitrary element' means 'undefined will suffice'
point x = fmap (const
On Fri, 13 Mar 2009 14:32:23 +
Ross Paterson r...@soi.city.ac.uk wrote:
On Fri, Mar 13, 2009 at 03:18:15PM +0100, Martijn van Steenbergen
wrote:
Are there any functors f for which no point/pure/return :: a - f a
exists?
No. Choose an arbitrary element shape :: f () and define
Well, yes; then, that means that an arbitrary element is also false:
you can't just take an arbitrary element and hope that works well.
Then the original question must be reformulated:
- Are there any functors for which there exists at least one
non-bottom value of type 'f a' for some a, but
On Thursday 12 March 2009 10:30:47 pm Robin Green wrote:
For most functors, that is equivalent to
point x = undefined
But by that logic, everything is a member of every typeclass...
There are some cases where expected laws will prevent that. For instance, If
you try to make a monad like:
On Fri, Mar 13, 2009 at 04:11:57PM +0100, Martijn van Steenbergen wrote:
Eugene Kirpichov wrote:
'An arbitrary element' means 'undefined will suffice'
point x = fmap (const x) undefined
Prelude fmap (const True) undefined :: [Bool]
*** Exception: Prelude.undefined
Or is that not what you
Ross Paterson wrote:
No. Choose an arbitrary element shape :: f () and define
point x = fmap (const x) shape
Interesting. Is the arbitrariness of the shape some sort of evidence
that Pointed is not really a very useful class in its own right?
Certainly, the shape does matter if you
On Sat, 2009-03-14 at 02:12 +1000, Matthew Brecknell wrote:
Ross Paterson wrote:
No. Choose an arbitrary element shape :: f () and define
point x = fmap (const x) shape
Interesting. Is the arbitrariness of the shape some sort of evidence
that Pointed is not really a very useful
On Sat, Mar 14, 2009 at 02:12:45AM +1000, Matthew Brecknell wrote:
Ross Paterson wrote:
No. Choose an arbitrary element shape :: f () and define
point x = fmap (const x) shape
Interesting. Is the arbitrariness of the shape some sort of evidence
that Pointed is not really a very
15 matches
Mail list logo