Re: [Haskell] Ambiguity problem

2005-07-22 Thread Wolfgang Jeltsch
Am Freitag, 22. Juli 2005 15:56 schrieb Mads Lindstrøm: > Hi Wolfgang > > Thank you very much for the reply. I added an extra parameter to the > function, so the code now looks like: > > foo :: (Data a) => a -> Constr -> Int > foo idType = (numChildren idType) . fromConstr > > numChildren ::

Re: [Haskell] Ambiguity problem

2005-07-22 Thread Mads Lindstrøm
Hi Wolfgang Thank you very much for the reply. I added an extra parameter to the function, so the code now looks like: foo :: (Data a) => a -> Constr -> Int foo idType = (numChildren idType) . fromConstr numChildren :: (Data a) => a -> a -> Int numChildren _ x = sum $ gmapQ (\_ -> 1) x

Re: [Haskell] Ambiguity problem

2005-07-22 Thread Wolfgang Jeltsch
Am Freitag, 22. Juli 2005 14:58 schrieb Mads Lindstrøm: > Hi > > I am struggling with an ambiguity problem. I have the following code: > > foo :: Constr -> Int > > foo = numChildren . fromConstr > > > > numChildren :: (Data a) => a -> Int > > numChildren x = sum $ gmapQ (\_ -> 1) x > > which I thou

[Haskell] Ambiguity problem

2005-07-22 Thread Mads Lindstrøm
Hi I am struggling with an ambiguity problem. I have the following code: > foo :: Constr -> Int > foo = numChildren . fromConstr > > numChildren :: (Data a) => a -> Int > numChildren x = sum $ gmapQ (\_ -> 1) x which I thought would work, but the GHC-6.4 says: > Ambiguous type variable `a' in

[Haskell] Haskell workshop 2005 -- Call for participation.

2005-07-22 Thread Daan Leijen
2005 Haskell Workshop Tallinn, Estonia, 30 September, 2005 http://www.cs.uu.nl/~daan/hw2005 Call for participation -- Important Dates --- Early registration deadline : July