[Haskell-cafe] Pointless functors

Eugene Kirpichov ekirpichov at gmail.com
Fri Mar 13 11:45:43 EDT 2009


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 there does not exist a
function point :: a -> f a such that (a != _|_) => (point a != _|_).



2009/3/13 Brent Yorgey <byorgey at seas.upenn.edu>:
> 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
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
Eugene Kirpichov
Web IR developer, market.yandex.ru


More information about the Haskell-Cafe mailing list