Re: [Haskell-cafe] Hoogle? [Stacking monads]

2008-10-09 Thread Ryan Ingram
2008/10/9 Reiner Pope [EMAIL PROTECTED]: The syntax is for the implicit parameter extension[1]. I think you would write your example as foo (undefined :: Bar x) ?z :: Bar y Then querying the type of that whole expression with :t will list ?z's type in the expression's constraints. (Of

Re: [Haskell-cafe] Hoogle? [Stacking monads]

2008-10-09 Thread Andrew Coppin
Reiner Pope wrote: The syntax is for the implicit parameter extension[1]. I think you would write your example as foo (undefined :: Bar x) ?z :: Bar y Then querying the type of that whole expression with :t will list ?z's type in the expression's constraints. (Of course, you should turn off

Re: [Haskell-cafe] Hoogle? [Stacking monads]

2008-10-08 Thread Ryan Ingram
On Tue, Oct 7, 2008 at 7:09 PM, Andrew Coppin [EMAIL PROTECTED] wrote: For my current troubles, it would be really useful if there were some program that you could feed some source code to, and it would tell you what the inferred types of each subexpression are. (Ideally it would be nice if

Re: [Haskell-cafe] Hoogle? [Stacking monads]

2008-10-08 Thread Reiner Pope
The syntax is for the implicit parameter extension[1]. I think you would write your example as foo (undefined :: Bar x) ?z :: Bar y Then querying the type of that whole expression with :t will list ?z's type in the expression's constraints. (Of course, you should turn off the monomorphism

RE: [Haskell-cafe] Hoogle? [Stacking monads]

2008-10-07 Thread Mitchell, Neil
Actually, I was thinking more along the lines of Data.Traversable.sequence, which has sequence :: (Traversable t, Monad m) = t (m a) - m (t a) Are you expecting c1 (:: * - * - *) to unify with [] (:: * - *)? That seems kind incorrect at the very last. Additionally, those types

Re: [Haskell-cafe] Hoogle? [Stacking monads]

2008-10-07 Thread Andrew Coppin
Mitchell, Neil wrote: Well, as I said, replacing one term with another transforms one signature into the other. I guess you can't curry type constructors as easily as functions - or at least, Hoogle currently doesn't like it. Yes, currying of type constructors is much less common, and

RE: [Haskell-cafe] Hoogle? [Stacking monads]

2008-10-06 Thread Mitchell, Neil
Hi Try doing a Hoogle search for c1 (c2 x) - c2 (c1 x). Hoogle correctly states that Data.Traversable.sequence will do it for you. Now try doing c1 k (c2 x) - c2 (c1 k x). The 'sequence' function will also do this, but now Hoogle returns 0 results. This is puzzling, since AFAIK, the

Re: [Haskell-cafe] Hoogle? [Stacking monads]

2008-10-06 Thread Andrew Coppin
Mitchell, Neil wrote: Hi Try doing a Hoogle search for c1 (c2 x) - c2 (c1 x). Hoogle correctly states that Data.Traversable.sequence will do it for you. Now try doing c1 k (c2 x) - c2 (c1 k x). The 'sequence' function will also do this, but now Hoogle returns 0 results. This is