Can someone explain why this is not working?
main = do
let a = 50
let y = 7
let area = (a ** y)
print (area)
print (a `mod` y)
I expected him to print:
781250000000
1
But instead, I get a series of ambiguous errors like:
test.hs:2:13:
No instance for (Num a0) arising from the literal `50'
The type variable `a0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
Note: there are several potential instances:
instance Num Double -- Defined in `GHC.Float'
instance Num Float -- Defined in `GHC.Float'
source
share