[Haskell-cafe] Numerics and Warnings

Aleksey Khudyakov alexey.skladnoy at gmail.com
Wed Apr 10 22:26:04 CEST 2013


On 11 April 2013 00:11, Roman Cheplyaka <roma at ro-che.info> wrote:
> * Aleksey Khudyakov <alexey.skladnoy at gmail.com> [2013-04-10 23:20:15+0400]
>> On 10 April 2013 22:25, Roman Cheplyaka <roma at ro-che.info> wrote:
>> This IS rather annoying problem for numeric code. Raising value to positive
>> power is quite common operation yet ^ operator generally couldn't be used
>> because it leads to warning about type defaulting (rightfully) and one
>> wants to keep code warning free. Actually it's problem with warnings and
>> I don't think adding some ad-hoc rules for generating warning is necessarily
>> bad idea
>
> You can disable the warning with -fno-warn-type-defaults.
>
Bu in most of the cases I do want this warnings. It's possible to get
something default to Integer when it should be Int. There are only few
cases when it's not appropriate. Only ^ and ^^ with literals I think



More information about the Haskell-Cafe mailing list