Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Re: Calling "zipWith" using "^" function. (Max Voit) ---------------------------------------------------------------------- Message: 1 Date: Mon, 9 Nov 2015 09:59:25 +0100 From: Max Voit <max.voit+m...@with-eyes.net> To: beginners@haskell.org Subject: Re: [Haskell-beginners] Calling "zipWith" using "^" function. Message-ID: <20151109095925.17d65...@veeloqu.lan> Content-Type: text/plain; charset=US-ASCII On Sun, 8 Nov 2015 23:14:11 -0500 Venu Chakravorty <c.v...@aol.com> wrote: > <interactive>:1:19: > Ambiguous type variable `a' in the constraints: > `Fractional a' arising from a use of `/' at > <interactive>:1:19-44 `Integral a' arising from a use of `^' at > <interactive>:1:20-24 Probable fix: add a type signature that fixes > these type variable(s) ============================ > Could somebody please throw some light? Consider the types of both (^) and (/). Then take a look at https://www.haskell.org/onlinereport/haskell2010/haskell2x.png and compare with your error message. Note especially that there is no connection from Integral to Fractional or vice versa. As a solution use either the already suggested (**) or fromIntegral (mind the last subsection of https://www.haskell.org/onlinereport/haskell2010/haskellch6.html ) best, Max ------------------------------ Subject: Digest Footer _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners ------------------------------ End of Beginners Digest, Vol 89, Issue 13 *****************************************