[Haskell-cafe] Equations for `foo' have different numbers of
arguments
Manlio Perillo
manlio_perillo at libero.it
Tue Mar 24 10:44:14 EDT 2009
Hi.
There is a limitation, in Haskell, that I'm not sure to understand.
Here is an example:
module Main where
divide :: Float -> Float -> Float
divide _ 0 = error "division by 0"
divide = (/)
main = do
print $ divide 1.0 0.0
print $ divide 4.0 2.0
With GHC I get:
Equations for `divide' have different numbers of arguments
With HUGS:
Equations give different arities for "divide"
However the two equations really have the same number of arguments.
What's the problem?
Thanks Manlio Perillo
More information about the Haskell-Cafe
mailing list