Re: [Haskell-cafe] What inhabits this type: (forall a. a -> b) -> (forall a. m a -> m b)

2007-02-27 Thread Neil Mitchell
Hi I have looked on Hoogle. I would have asked Djinn, but I don't have it around. So, can someone find a term that inhabits (forall a. a -> b) -> (forall a. m a -> m b) Asking hoogle about rank-2 types won't get you very far, the development version of Hoogle gives a warning that it ignores

Re: [Haskell-cafe] What inhabits this type: (forall a. a -> b) -> (forall a. m a -> m b)

2007-02-27 Thread Nicolas Frisby
The type doesn't actually indicate that the type m supports a return operation. I introduced the qualifier that it was a functor. You implicity introduced the constraint that it is a monad (actually a "pointed functor", but that's a Monad's return operator). With that constraint, your thought proc

Re: [Haskell-cafe] What inhabits this type: (forall a. a -> b) -> (forall a. m a -> m b)

2007-02-27 Thread Bryan Burgers
Since my last query was answered so quickly, let's try another. I have looked on Hoogle. I would have asked Djinn, but I don't have it around. So, can someone find a term that inhabits (forall a. a -> b) -> (forall a. m a -> m b) ? I think of this as the type of functions that, given a functio

Re: [Haskell-cafe] What inhabits this type: (forall a. a -> b) -> (forall a. m a -> m b)

2007-02-27 Thread Nicolas Frisby
At the risk of seeming terribly naive, I'm going to go ahead and share my intuition. Would not any function of type (forall a. a -> b) be a constant function in b? If the function is allowed no inspection of its argument, it must not depend on its argument. The same intuition could be applied to

Re: [Haskell-cafe] What inhabits this type: (forall a. a -> b) -> (forall a. m a -> m b)

2007-02-27 Thread Isaac Dupree
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jacques Carette wrote: > Since my last query was answered so quickly, let's try another. > > I have looked on Hoogle. I would have asked Djinn, but I don't have it > around. So, can someone find a term that inhabits > (forall a. a -> b) -> (forall a

Re: [Haskell-cafe] What inhabits this type: (forall a. a -> b) -> (forall a. m a -> m b)

2007-02-27 Thread Stefan O'Rear
On Tue, Feb 27, 2007 at 06:01:44PM -0500, Jacques Carette wrote: > Since my last query was answered so quickly, let's try another. > > I have looked on Hoogle. I would have asked Djinn, but I don't have it No you couldn't. Djinn doesn't support rank2 types. (FWIW you can go to #haskell at cha

[Haskell-cafe] What inhabits this type: (forall a. a -> b) -> (forall a. m a -> m b)

2007-02-27 Thread Jacques Carette
Since my last query was answered so quickly, let's try another. I have looked on Hoogle. I would have asked Djinn, but I don't have it around. So, can someone find a term that inhabits (forall a. a -> b) -> (forall a. m a -> m b) ? I think of this as the type of functions that, given a funct