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
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
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
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
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
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
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
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