[Haskell-cafe] Re: Ambiguous type variable woes

Gleb Alexeyev gleb.alexeev at gmail.com
Mon Nov 24 03:09:10 EST 2008


Jacques Carette wrote:

> -- This does not however help at all!  The only way I have found of 
> 'fixing' this requires annotating the code itself, which I most 
> definitely do not want to do because I specifically want the code to be 
> polymorphic in that way.  But GHC 6.8.2 does not want to let me do this.
> 
> What are my options?

If my guess is correct (sorry if it's not), you want the code to be 
polymorhic so that you don't have to write the shape of the stack twice. 
Then the way out is to annotate the type of 'empty':

test1 = first . p 2 . p 3 $ (empty :: ((), Void))



More information about the Haskell-Cafe mailing list